There are many different techniques and tricks you can apply to scripting so i felt it would be a good idea to collect everyone’s scripting tips in a thread and keep it up to date.
These tips can be anything from how to record something properly to preparations that makes life easier and everyone is welcome to contribute to this thread.
Plan out your test cases before hand so that unknown user flows don’t cause problems when testing
It is easy when pulling the test data that users with a missing setting is used for example, this can lead to the application wanting them to change their password for the first login or that they get redirected to a page to choose home country. If these aren’t handled it will lead to unexpected status codes that will cause the test to fail with false positives.
Proper usage of inner-loops and input-files will allow you to make multiple user flows in one test
This can help you simulate abandonment rate to use in E-Commerce testing for example as it will allow you design a test that where 90% of all users complete everything up to purchase and only 10% of the users fully completing the purchase. Detailed information on how to achieve this can be found in the ZebraTester User Guide here.
When configuring your test ensure that you have think-times that are anchored in reality
This is something that is commonly missed, a default think time is present and left unchanged in your test-configuration which leads to wrong load being put on your system. Doing the research and using real life think times is always advisable and can usually be taken from your analytics tool, “Average Time on Page” and “Average Session Duration” metrics will be helpful here in verifying your think time per page and total think time for the full test.
You can use Firefox or Chrome to create a .har recording to import to ZebraTester
Under your browser’s Developer Tools > Network then enable persistent or preserve logs before doing the scenario. When finished with the scenario right click the captured data and “Save as HAR…”. Copy over the HAR file into My Tests folder of ZebraTester. Convert HAR file into prxdat file from Project Navigator.
Edit responseVerification.dat to match mime types to your static resources.
ZebraTester only maps the following mime types as static resources by default,
Do you have any tips that you feel should be here? Post a reply or send me a PM and i will add it to the list.