First of all, we get the interface documentation, began testing document (check if there is a wrong character, etc.), analysis of whether there is not understand of place, if can seek development way, the most important is to each request parameters of the interface, and its return value are familiar with, and know the correlation parameter
Use cases to write
Familiar with the interface document, begin to write the interface test cases, mainly according to the request parameters written legal and illegal, illegal things are (the scope of the parameters types of illegal, Taiwan before and after definitions are consistent), such as login interface, password is the equivalence class of boundary value
If the interface and the strict order, we have to consider a transfer order test, such as first log in to add to cart
The tools used
Automation? Python + requests
Manual: jmeter, postman
The test execution
Tests of single interface, and then test the link interface
Passes the test, first we need to ensure that interface is good, according to the parameters on the interface document normal incoming, confirm the returned result
Parameter combination: then we need to consider the combined parameters, such as: commodity details the required fields (id, name) of the interface, there are also optional, if I've done these required fields optional combination, whether can request success
Interface security: whether to bypass validation? Like to buy a commodity, its price is 300 yuan, and that when I was in pay, I change the price of the goods to 3 yuan, the back-end do verification, more malicious point, I put the Qian Gaicheng - 3, increase my balance?
Not whether businesses can modify the interface of the commodity information
Validation: abnormal input parameters according to the illegal situation to fill in, as will preach not will, parameter type, the length,
If there is a performance index, may also need to test, interface concurrent conditions, such as more than one user at the same time for the last goods, the response time of the interface, the corresponding return
BUG tracking management
Write the test report
CodePudding user response:
Manual is jmeter + postmanAutomatically with Java + httpClient why python is not recommended, because some interfaces need to RSA encryption, python crypto library is installed is very troublesome, Java JDK is settled, don't need
CodePudding user response:
Come to learn,,,CodePudding user response:
https://edu.csdn.net/course/detail/22948