Description: I have been automating the interface of the old system recently, and the interface of the old system lacks maintenance; I sorted out the main business process step by step, and then verified the main process interface on jmeter (by the way, I also made the order interface Concurrency, discussed in the next issue), after the interface process runs through, you can directly and quickly write interface automation test cases
Knowledge points involved: login, obtaining token, and setting token as a global variable
The steps are suitable for students with a little basic knowledge
First log in, and then extract the login interface return parameters [use a json extractor for multiple parameters, see the following figure for usage rules];
Set the interface to default In the configuration component, finally set token as a global variable [see the script below]
1. Response Assertion (response assertion)
2. Size Assertion (packet byte size assertion) )
Determine whether the response result contains the correct number of bytes.
Definable (=, !=, >, <, >=, <=)
3. Duration Assertion (duration assertion)
Determine whether to return within a given time Response result (ms)
4. Beanshell assertion (free assertion)