RedLine13 provides the ability to run several different types of tests on our platform by filing out only a few basic details and clicking “Start Test“. However, we also provide the capability for you to write your own code-based custom load tests in PHP, NodeJS, or Python.
To run a Custom test on RedLine13, begin by logging into your account, clicking on “Start Test“, and then navigating to the “Custom Test” tab:
Running Your First Custom Test
In order to run a custom test on RedLine13, you will need to have a test plan script prepared beforehand. We have some sample custom test source code hosted on GitHub that can help illustrate by example. These open-source examples can be used as a starting point and modified when developing your own tests. In addition to the resources below, we also have a blog post which covers getting started with custom load tests.
Once you have your test plan script prepared, you will need to upload and configure your test on RedLine13:
- Upload your test plan script as your “Custom File” to RedLine13 as depicted above.
- Specify the number of load generator servers you wish to run your test from.
- Upload any attachments (e.g., CSV files) as “Extra Files“.
- Click on “Start Test“.
|Custom File||This is where your custom PHP, NodeJS, or Python test script source file will be uploaded.|
|Number of Users||This will be the total number of users to simulate.|
Under “Advanced Custom Test Options” we provide the ability to select between a PHP, NodeJS, or Python test.
Specific here for NodeJS tests is the ability to enable the “Node Version Manager“. We recommend that you utilize this for your NodeJS tests, and that you select version 8.* or higher.
Sample Custom Test Source Code
We also have some sample custom test source code hosted on GitHub that can help illustrate by example. You can also feel free to modify these open-source examples when developing your own tests. In addition to the resources below, we also have a blog post which covers getting started with custom load tests.
PHP Custom Tests
Each custom load test type has its own unique requirements to successfully run on RedLine13. There are two ways to submit a custom PHP load test:
- Submit the load test file (in the format *.php) in the version of PHP specified, or
- Submit a compressed archive (*.tar, *.tar.gz, and *.tgz are currently supported) with the custom file specifically named Custom.class.php
We support the Composer plugin for PHP tests, so if you simply include a “composer.json” file and our system will attempt to install any required dependencies.
The currently supported version of PHP is 5.5.9. If you have a need to run a different version of PHP, please reach out to us at firstname.lastname@example.org.
NodeJS Custom Tests
For custom tests written in NodeJS, there are a few specific requirements:
- Submit the load test file (in the format *.js) using the version of Node specified, or
- Submit a compressed archive (*.tar, *.tar.gz, and *.tgz are currently supported) with the custom file specifically named CustomTest.js
We support npm for loading packages referenced within your test files. Simply include a package.json file when you upload your load test and we will run npm install.
Additionally as described above, we recommend that you use the “Node Version Manager” to specify the required version of Node for your test.
Python Custom Tests
As with the other languages, running a custom load test using Python on RedLine13 has a few requirements:
- Submit the load test file (in the format *.py), or
- Submit a compressed archive (*.tar, *.tar.gz, and *.tgz are currently supported) with the custom file specifically named custom_test.py
In addition to the Python test harness listed above, we have a few additional Python examples which you may reference or modify for your own testing purposes:
|custom_load_test.py||Simple test against a single URL with an echo.|
|example_test.py||Loops 100 times with a random wait time, with URL and page recorded for each loop.|
|form_load_test.py||Gets data from a web page, parses for a form, and then submits that form with data.|
|login_load_test.py||Submits login information via a form. (To use this script, you will have to modify code and add in login data.)|
|simple_load_test.py||Accesses a single URL, parses for other embedded resources (*.js, *.css) and accesses those as well.|
CSV Data and Compressed Archives in Extra Files
Any custom load test supports extra files, with CSV files and compressed archive having special context. When a CSV file is uploaded, there is an option to “split” that file across all load generators. This works by dividing the file as evenly as possible (by whole line) with each load generator getting a different fragment of the file.
Compressed files (*.tar, *.tar.gz, and *.tgz) can either be uploaded in their compressed form, or marked to be expanded after being uploaded to each load generator.
Save Response Output and Calculate Percentiles
You may notice a checkbox option when running your Custom test that is labeled “Save Response Output and Calculate Percentiles“. If you tick this box, our systems will collect and store log files for your test. In addition, we will also parse your load test data to calculate and display percentiles information.
Advanced Cloud Options
This section will be available when you have integrated with AWS. Though AWS integration with RedLine13 is not required, it unlocks the greatest potential for scaling your load tests. The default instance size for load generators is m3.medium, and if no other configuration changes are needed beyond AWS defaults within your account this may suit your testing needs just fine. However you can fine tune load generator server type and properties to best match your test plan requirements. This will enable you to run your load test with maximal cost efficiency and also ensure that each load generator has the proper resources it needs to execute your test. A survey of the most pertinent advanced cloud options fields is as follows:
|Location||The options listed here correspond to AWS regions where your load generators will originate from. This field is required (with the default being US-East-1) however multiple regions can be configured for the same test, if desired.|
|Number of Servers||This will be the number of load agents (i.e., servers in AWS running your test plan). Each server will run your test plan in parallel. If this setting is changed here, it will also be updated above under the general test options.|
|Size||This is the AWS EC2 virtual machine size (with the default value being m3.medium). You can select a larger or smaller instance size to adjust for required capability for your test.|
|Disk Size||Each load generator is a virtual machine with a logical disk. The default disk size is 16GB and depending on the requirements of your test you may need to increase this size.|
|Subnet ID||If the load generator EC2 instance requires a subnet to be specified, you can select it from this drop down list.|
|Security Group ID||If your test requires a custom security group to be specified, you can do so using this field.|