During the preparation phase of a performance testing project, several key steps need to be performed when creating/developing the performance test scripts. This article describes the key steps that are involved during the performance script development.
- Firstly, make sure the business use case process for the identified script is correct and functionally works. Check to see if there is an automated test if there is, then the process for script development is different as you can transform the automation script into a performance script, Refer to our Performance Testing Framework article for more information. If an automated test does not exist, then run the use case manually through the system to ensure the functionality works as per the use case process. If this is the case, then move to step 2.
- Record an initial script with the performance tool that been selected. Refer to our article on Testing tools -Test tools analysis
- Record a second version of the initial script.
- Compare the two scripts to find any differences/correlation points.
- Amend/Update the script by adding in all the correlations so the script replays successfully with the original data.
- Insert parameters to handle any data constraints.
- Replay the script with the new parameterised & correlated data to ensure the script still works.
- Add in coding standards/guidelines to the script. Refer to our article Performance Testing -Script Guidelines
- Add in properly formatted transaction names.
- Add in any text checks or any other verification checks.
- Add in any error handling to ensure the script is robust.
- Define all the desirable data parameters to give a proper range of data and created a full set of data files
- Add output file logging (if necessary).
- Replay the script with multiple iterations to ensure its robust.
- Add in realistic think times.
- Run the script from a remote load generator (not the machine used to record the script) with 2 concurrent users.
- Add any comments into the script.
- Remove all debug/code messages from the script.
- The script should now be ready to run.
In conclusion, when creating a performance test script, the steps described above should be performed to ensure your script works consistently and is robust.
To find out how SQA Consulting can assist you with your performance testing needs contact us.