I'm working on a project recently , By the way, the Eolinker The design ideas of interface test cases mentioned in the training are summarized , There are two main directions involved .
The first direction is independent interface testing ;
The second direction is multidimensional interface testing , By constructing scenarios to enrich the interface test data to achieve .
Use case design —— Direction one :
Use case one
Basic function , All parameters
1、 Refer to the interface document , After understanding the interface function , First, determine whether it is in line with the business requirements logic
2、 Verify basic functions , Transfer all the involved parameters to parameters
Use case two
Missing options
1、 There are only required items in the pass reference , No optional parameters
2、 There are only required items in the pass reference , One of the optional parameters is missing
Missing required fields
1、 One of the required values is missing in the pass parameter , Reference changes 1 principle .
2、 All required parameters are missing in the pass parameter , There are options
3、 Change the required parameter name to illegal
Use case three
Parameter out of bounds
1、 The boundary value of the probe parameter , Interface detection through boundary values
Use case 4
Parameter type
1、 character string 、 integer
Use case five
Covering all paths , Including normal 、 abnormal
Case 6
Warehouse in and out inspection
Put in storage a, The median value of the library is :a, The query value is a
Use case design —— Direction two :
Use case seven
Scenario building
This is also important , This comparison test er Proficiency in business , Simulate as many scenarios as possible , To achieve a more comprehensive interface test coverage
example :
Specific reasons for failure Name cannot be empty and restricted 1-50 Characters 165
Nickname cannot be empty and restricted 6-24 Characters 166
Company name cannot be empty and restricted 4-128 Characters 167
Fixed line telephone format error 168
The email format is incorrect , Please modify and save 164
Please select a city 154
Please choose gender 3003
Above is 7 Class use case design method , If there is any omission, please add it later .