Creating tests in LoadImpact
Things to consider
As mentioned in load test preparations, a key to good testing is understanding what your users are doing, what services are most critical to your service, and what things are most critical to your organization. Knowledge of these things will guide you to create tests that are realistic and meaningful. If you are new to testing, you may want to read our Testing Methodologies
We will not explicitly cover options within this article. Options allow you to configure the ramping profile and other built in functionality. A default structure is provided for tests created from either the Chrome Extension or uploading a HAR file. For more information on options, refer to this article. To alter the test length or number of VUs, refer to the stages property within the test script.
Creating your test scripts
Entering Website URLs (URL Generator)
This method of test script creation is the simpliest. It allows you to enter multiple URLs, select a number of Virtual Users, test duration, set a ramping profile, and load zones where the test will execute from. You are also able to whitelist so you are only testing certain domains.
Important: This test will only make GET requests and is not intended to test APIs. If you are testing APIs, please select API test scripting option. Scripting allows you to define payloads, make different HTTP requests, alter headers, etc.
Recording a browser session - Chrome extension
The LoadImpact Chrome Extension is an easy way to create a test script, simply by browsing like a user would. To use the chrome exstenion you would:
- Start recording
- Browse across multiple pages/actions, like a user would
- Stop recording
- Edit your script, if necessary
To start using the chrome extension, you can start in app here
Recording a browser session - HAR file
The HAR file converter allows you to convert a HAR file into a test script. This enables you to create a HAR file from any method you would like. The LoadImpact web interface allows you to upload a HAR file for us to convert. For more information on create HAR files please refer to this article
After your have recorded/written/edited your test script, go ahead and run it. The platform will read your test configurations and start launching the test on our infrastructure. Once the first results are returned, you will start seeing them within Insights Result Analysis. While the test is running our Performance Alert algorithms will automatically detect patterns associated with performance problems.
Remember: Testing is an iterative process. You should expect to run your tests multiple times to identify/fix performance issues, debug your script, etc.
Once your first test results are in, refer to our articles on Result Analysis
I need to parameterize data from a JSON or CSV file, how do I do that? In order to include external files in your test script, you would need to trigger your test from the command line. For purposes of a proof of concept, many users will create a table with necessary data in their test script before moving on to that. We have code samples of parameterization here.
How are cookies handled? Do I need to do anything special? Cookies are handled automatically. The browser recorders are thorough in what they capture. This means you may want to remove cookies from your script. If you are handling any session tokens in cookies, this is an important step to consider.