Automatic testing of background interface (1)

According to the test pyramid theory, the benefits of automation are unit testing, API testing and UI testing in descending order. The main body of unit testing is generally developers, and the main body of API testing and UI testing is testers. Compared to UI tests that are fragile, expensive to write, and time-consuming to run, API testing has a much higher ROI and is the best place for testers to do automated testing.

 

In the past six months, I have gained some practice and experience in APP automation testing. In 2017, based on business needs, I set a small goal for myself to study automated testing of background interfaces. I hope to record the problems and solutions encountered in the entire automation process in the form of a blog.

 

background

Project A is a live broadcast type product, and it has been less than a year since the project was established last year. The characteristics of this project are: 1. The threshold for special audio and video testing is high, and the time period for one round of testing is long; 2. The version release cycle is short, with an average of 2 weeks. The test content includes client (iOS&Android) test, background test, middle layer test, CMS test, performance test (memory, power, traffic, etc.), audio and video special test. Testers' business tests are heavy and often work overtime, and test execution is mainly performed manually. The most direct way to improve test efficiency is to automate testing, and the most important thing is to do automatic testing of interfaces in the middle layer and background. The goals are: 1. Improve the efficiency and coverage of background testing; 2. Provide the dial test function of the background interface of the existing network to meet the needs of operation and maintenance monitoring

 

Phase 1 testing strategy:

1. Interface level coverage

Input: normal parameters, output: 200

Problem: Some interfaces fail to work, promote development to solve the problem

2. Improve the interface testing requirements

Goal: Cover normal input and abnormal input

Difficulties: selection of parameter combinations, measurement of interface coverage

3. Organize the interface testing process

Status: The middle layer/backend is tested together with the client, and the backend function is verified through the test on the client

Work item:

(1) Sort out the types of middle-tier/back-end testing and existing testing methods, strip out the content that can be tested separately for the interface, and determine the priority of interface automation

(2) The new test requirements, involving newly added or modified interfaces, require the preparation of interface automation use cases, and use case review is required after the use cases are written.

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326676945&siteId=291194637