overall framework
pytest+allure+appium adopts po layered design and integrates into jenkins to run
Framework
name | effect | Remark |
---|---|---|
BasePage | Store the corresponding packaging method | base class layer |
Pages | The page layer is used for positioning and encapsulation of elements | page layer |
TestCases | Write test cases | use case layer |
Report | deposit report | reporting layer |
Public | public calling method | public layer |
Log | log storage location | log layer |
Image | Used to store failed screenshots/image recognition, etc. | image layer |
Config | configuration center | configuration layer |
ExcelData | Excel data assertion verification | data layer |
InstallApp | Install App according to jenkins passing parameters | |
* | The above are python package modules, and the following are independent files | * |
conftest.py | The essence of pytest, easy to use but difficult to master | |
pytest. ini | The main configuration file for pytest | |
run.py | Run the main file and cooperate with receiving jenkins parameters |
Execution process (brief)
Collaborative Guarantee
About how to obtain test cases and storage points of use cases
When writing UI automation use cases in the early stage, it is used to communicate with the corresponding business testers to inquire about the test cases, to mark the completed use cases and return them to the business testers. Continuous iteration will encounter continuous modification of use cases. If this method is still used for communication, the cost is very high, and it is not intuitive, and real-time collaborative work cannot be completed
After discussion, it was moved to the online DingTalk document. Different modules were planned in the document. Each module included the responsibilities of the testing and development part and the responsibilities of the testers. The business testers wrote, modified and maintained the use cases in the online documents to ensure the use cases The latest, the tester is responsible for marking whether the automatic coverage is realized
Can it be automated | Whether to cover | Remark | priority | use case name | Preconditions | test steps | Test Results | Remark |
---|---|---|---|---|---|---|---|---|
0 is no 1 is yes | 0 is no 1 is yes | If you have any doubts, open the remarks | P0 | Login to XXX | XXX | XXX | XXX | Remarks for business testers |
In some scenarios, individual steps may not be implemented, and it is necessary to communicate with the business tester.
Testers and testers use different colors to mark
For the coverage statistics of test cases, you can download the excel document, calculate the statistics through the code, pass it into the database, and display the data of each module through Grafana
What follows:
【iOS Automated Testing】Chapter 4: Practical Application