Friday, September 5, 2014

Customizations for performance scripts



Once a navigation has been recorded using the performance testing tool, the recorded script should be customized such that the same script works fine for different users who can choose different things in the same navigation.

Below are the 5 important customizations made to any performance script
Parametrization – To simulate different user inputs, a script should be parametrized. To be more specific, any text field that is seen in the navigation (or the use case) should be parametrized. The best example for this is the user name and password or search text entered in search box. The most common way of parametrization is reading the values from a file.

Correlation – To achieve different user selections, that navigation should be correlated. This also means handling all the dynamic data in a particular request. From the application point of view all the Radio buttons, Drop-down fields, check boxes can be handled by implementing correlation in the script. But the performance tester should also ensure that any other dynamic data that is sent to the server as part of the request should also be handled using correlation.

Page Verification / Validation – Another important aspect of performance testing is validating the response. This can be achieved by having Text validation from the response. A text that is expected in the response should be searched and if the text is found, the request is assumed to be successful else, the request would be considered as a failure. Enough care should be taken while choosing this text that is to be searched for. The text should be static, specific to that particular response and preferably towards the bottom of the response

Transactions – One of most important reasons a performance test is executed is, to figure out the time it takes for the pages to load. To measure this time, the scripts should be included to have transactions

Think time: To simulate the user behavior of waiting between the requests either to read / fill in details (write) or to think if the content is appropriate or not, think time is used in the script.  Once the thread / virtual user receive response for the previous request, they would wait for the specified time before sending the next request.

Irrespective of tool, these customizations (whatever applicable) are made to all the requests in the navigation. Hope this information is helpful. If you like this article, please like it / Share it.


No comments:

Post a Comment