Reconstruction of automated testing actual project description

Foreword

Recently a lot of people and I reacted project combat code on GitHub I can not run, I simply looked at a few people the wrong message, mostly because of the development environment, 126 Mailbox Plus or problems caused by the code itself, just in time for the weekend , spent two days to several projects can run simple re-write a little, here is the main mailbox 126 projects, including several other interfaces and other Ui test project I really can not provide the information and the database account information you use to measure the site, and therefore is not running, here to say I'm sorry, but I still open the code on GitHub, although not run, but also has some learning value, then talk about the run of a few projects I changed anything, so students want to learn can smoothly run the code.

Keyword-driven testing actual combat

GItHub address

https://github.com/13691579846/KeyWordDriverTestFrameWork

blog address

https://www.cnblogs.com/linuxchao/p/linux-python-selenium-keywordFW.html

Content

Modify the code for the entire project of naming and coding standards, to make it more in line with PEP8

Modify the test step login function, due to the upgraded 126 mailboxes, log in to add a page is selected scan code login password or account, and therefore the use case adds this step to select the account password

The new section is added with a modified embodiment of the problem and sometimes cases are marked as error codes N or when Y is

. Abandoned the use of simulated keyboard combination to achieve cut version upload files (unstable), use the send_keys method of providing selenium (did not notice before, today changed when it was discovered directly send_keys)

Keyword data-driven testing may be applied to RobotFrame framework, the study of this project is also useful for learning RF, of course, so that the main aim of the project is to understand the concept of keyword-driven

Data-driven testing actual combat

GitHub address

https://github.com/13691579846/DataDriverTestFrameWork

blog address

https://www.cnblogs.com/linuxchao/p/linuxchao-datadrivertestframework.html

Content

Modify the code for the entire project of naming and coding standards, to make it more in line with PEP8

Modify the test step login function, due to the upgraded 126 mailboxes, log in to add a page is selected scan code login password or account, and therefore the use case adds this step to select the account password

The reconstruction of part of the directory structure, add a base.py file to the project more in line with PageObject design patterns

The reconstruction of the execution logic use case, it is possible to not only a one-way operation, which may be selected with which embodiment does not perform execution Example

Adding functionality failure patients with screenshots

The project is mainly to understand data-driven ideas, data and other testing frameworks for learning unittest drive some help

Pytest real test framework

GitHub address

https://github.com/13691579846/PytestAutoTestFrameWork

blog address

https://www.cnblogs.com/linuxchao/p/linuxchao-pytest-Actual.html

Content

Modify the code for the entire project of naming and coding standards, to make it more in line with PEP8

Modify the test step login function, due to the upgraded 126 mailboxes, log in to add a page is selected scan code login password or account, and therefore the use case adds this step to select the account password

For all the use cases were resolved, the selection of which asserted cancel method, depending on the message input different data systems using nested if analysis to determine the results of the test data packet, also with the cases grouped so readable logic and use cases stronger

. Abandoned the use of simulated keyboard combination to achieve cut version upload files (unstable), use the send_keys method of providing selenium (did not notice before, today changed when it was discovered directly send_keys)

Adding a mechanism to re-run failed, mainly through pytest-rerunfailures plug-ins and add a command line to choose the way to achieve

. Conftest.py modify the file in the test directory, the management conditions of the separately performed before and after the embodiment, the logic is clearer

When you delete a pytest-html test report generation, report the presence of useless link row

. Excel abandoned by the management of test data, instead of the specified file py to manage data, primarily for simple operation.

. Pytest framework of realization of the project relative to the previous two projects, more flexible, more comprehensive and also more difficult, hope to have some help for you want to learn pytest testing framework

unittest framework combat test

GitHub address

https://github.com/13691579846/Petrochina_Retail_Test_Project

blog address

https://www.cnblogs.com/linuxchao/p/linuxchao-python-selenium-demo.html

The project did not make any changes, because the project itself restricted network, it is necessary to change or not change nothing, like we used as a reference

to sum up

The above four projects for educational purposes only, used in the project 126 email account is my own person, so we try not to use my account to test into their own account

All projects have room for improvement, we can understand the lack of yourself to modify the code on a project basis, or reconstruction of the entire code according to their own ideas

3 projects can be executed, I have added the environmental management document requirements.txt, if you clone this project, just run pip install -r requirements.txt command in the project directory to automatically install all the third-party use of the project dependent libraries - Note: It is best to project a new key blank virtual environment, install the library project used in a virtual environment, to avoid local environmental projects and environmental conflicts, leading to not run successfully

Tip: If the 126 mailbox itself frequently log on and send mail, there will be a verification code verification, even if your code is clean up the cookies, so to automate a lot of trouble, so try to ensure that the limited test data to project , it is enough for learning

Finally, I hope that the road to success are welcome to add shadow group we will study together to discuss:! QQ878565760

Guess you like

Origin www.cnblogs.com/linuxchao/p/linuxchao-Project-Reengineering.html