Current location - Loan Platform Complete Network - Big data management - The construction and application of automation testing
The construction and application of automation testing
I. From UI automation to interface automation

1. UI automation

Framework: appium+airtest

Pattern: PO pattern - used to manage the maintenance of a set of page elements of the object library

Application scenarios:

(1) app before the release of the core scenario regression testing

(2) multi-channel package regression verification

(3) app big data buried in the validation of the application. (1) core scenario regression testing before app release

(2) regression verification of multi-channel packages

(3) app big data buried automation test

2, interface automation encountered problems

(1) pattern design?

(2) Use case management?

(3) Assertion

(4) Test results display

(5) Different environment management

(6) Different scenarios test

Second, the construction

1, the framework: Junit5+Rest-assured, the use of a PO-like model, use cases and parameters are separated, the data-driven packaging of various scenarios, to complete the test of each scenario

2, yaml

(1) @ParameterizedTest to achieve the parameterization of test cases, from the data-driven use of cases, dynamic management of use cases

(2) to create an ObjectModel object and yaml file corresponds to the configuration file to read the generation of use cases

(3) the use of yaml file management environment and different test scenarios and public **** parameters

3, assertion - hamcrest

(1) different from the UI automation of the assertion , the interface returns data will be more rich in the way of assertion

(2) support for combination of assertions

(3) support for json schema assertions

4, test reports - Allure

(1) Allure is a very lightweight and very flexible open source test report generation framework , support for a variety of test frameworks including testng, junit5, pytest.

(2) supports @feature@story@step@addAttachment@description multiple annotations

(3) simple interface, scalability

Third, the application of scenarios

1, the distribution center of the Core requirements of the distribution center ordering scenarios through the interface, the order interface of the various scenarios to manage, to facilitate the daily needs of testing and use case management

2, interface upgrade iteration is completed, you can through the interface automation timing test, timely detection of problems

3, the combination of various scenarios, a one-time completion of the completion of the process from the order-query-refund can not be through the use case tag management Scenario use cases

Fourth, the subsequent planning

1, use case scenario classification

2, use case priority

3, assertion optimization