Create a simple REST GET test
To configure and execute this simple test you’ll need:
- Access to the Real Load portal. If you haven’t signed up, do so first: Sign Up)
- A REST API URL you can test with a GET request. You can otherwise use the REST API mentioned in the description
- Approx. 20 minutes of your time
- A cup of tea or coffee
Prepare the project
- Create a new project called “Simple REST test” (… or something that makes sense to you)
- Click on the create project icon (pointed at by the green arrow) and then enter a suitable name for the project.
Then define a new resource set in the freshly created project. I’ll call this “GET tests”, but again feel free to chose any name that makes sense to you.
Create the test script using the HTTP test wizard
Now we’ll create the test script with the help of the HTTP test wizard.
Enter a name for the test script and click on OK.
Then click on “Add” and select “URL” from the menu. This is to add a new URL request to the test script.
Enter the URL of the REST API endpoint, for example https://www.realload.com/RealLoadListImagesWS/rest/AWSImages
- In the “Verify HTTP Response” section add some validation assertions. In this case I configure response code HTTP 200 and in the response body the string “ap-southeast-2” should appear.
- Then click on “Add URL”.
Debug your test
You can now test with the debugger that your test does what it is supposed to do.
Click on “Debug Session”:
Then click on Next Step to execute the REST request. Note the update in the area highlighted in red.
You can inspect the response header and body by clicking on the icons pointed at by the arrows:
The response content (body) will appear in the debugger. If all looks good, close the window.
Save and compile the test
The last step is to save the test and the execute it. First exit from the debugger window:
.. then save the session using a suitable name. Also select the resource group the test should be saved to.
Now generate the Java code that will contain your test logic which will be executed on the Measuring Agent. Click on “Generate Code”:
Then click on “Generate Source Code” and “Compile & Generate Jar”.
Now that the test code is compiled, you can define a new test that by clicking on “Define New Test”.
You’ll have to give a name to this test job, enter something meaningful to you:
Execute the test job
You’re now ready to execute the test. Click on the test you’ve just defined to create a new test job:
… select “continue”…
… select the agent to run the test job from.
You’re now ready to start the test. Click on “Test jobs” then click on “Start Test Job”:
.. select the number of Virtual Users to simulate, duration of the test and think time between test loops:
Limitations if using a free account
A free account allows you to prepare and execute load tests with the following limitations:
- Max load test job runs per 24 hours: 12
- Max load test job duration: 15 Minutes
- Max disk space storage: 0.5 GBs. This is used to store load test scripts and results.
- Max Virtual Users per execution: 50
You can add a Real Load license to your account at any time by purchasing it in our shop https://shop.realload.com .
Monitor the test job
Once the test job is running click on the “Monitor Jobs” menu item:
… and you’ll be able to see measurement related to your test job:
Done, congrats, you’ve run your first load test with Real Load.
To learn more we suggest heading to the User Guide section where you’ll find detailed documentation in relation to the steps outlined in this document.