Creating JMeter Test
Creating a JMeter test is a straightforward process. You should choose “Create JMeter Test” option on the main screen.
There are 3 main steps to follow to create a JMeter test.
Step 1: Basic Settings
- Test Name is a mandatory field as it will be in the name you will see when you go to My Test menu.
- Upload File field let you upload JMeter scripts, CSV file or other third-party JARs. Whenever a test is saved, newly added files are uploaded to our servers. In case there’s an update, Loadium will automatically update the files by matching them by their file name.
Note: At least one JMX file is mandatory to save a performance test project.
Note: In case, your JMeter scripts are using a CSV file, this file’s location should be an absolute path.
In case JMX file has “/usr/loadium/perf_test/user_data.csv” as CSV file path, it should be changed to “user_data.csv”. Uploaded files will be stored in the same directory in AWS so there shouldn’t be a relative path.
- JMeter Version: Choose which the JMeter version where you implemented your test scripts.
- Split CSV File: Select this option to split your CSV data into different engines.
Important note on Split CSV
In general, all performance scripts have a data source (CSV file,etc..) for every request to use a different data. There are two different approaches to consume test data.
- First one is that test data never expires
- The second one is that test data should be used once.
Example: To make a performance test on “a single sign-on” system requires a thread to use a test data once during the test because only one user can be logged in to the system at once. But in a totally different scenario where “you order a food”, test data can be used by every thread generated.
To overcome this issue, you should use the Split CSV File option. If this option is chosen, CSV file will be split into “generated engine number” and uploaded to every engine separately. In case it is not chosen, CSV file will be uploaded to all engines and every thread group will share the same file.
Settings Performance Test Parameters
Performance test parameters can be configured in your JMeter scripts. But for some case, you might want to override them. So you use those options to change any value you want.
- Engine Count: This parameter let you create engines on Loadium’s servers. The parameter is 1 by default. You can change it according to your subscription type.
- Thread Count: This parameter let you define thread number to create in each engine generated. Maximum thread count per engine is 500 by default.
- Ramp Up Time: This parameter let you define the total time for all threads to start. Example: In case you have 500 threads and 10seconds ramp-up time. For every second, 50 thread will be generated by Loadium.
- Iteration: This parameter defines the number of iterations for every thread to execute the test scripts.
- Duration: This parameter defines test time for Loadium to execute.
- If your test script has 3 Thread Groups in it and you set 500 thread on test configuration, Loadium will override each Thread Group. So total number of Thread count will be 1500. This might corrupt your metrics in case it is not considered. So be careful about it!
- The execution time of a test script is defined by Duration or Iteration parameters. In case not all iterations are completed during the defined “Duration”, test execution will stop. The same rule applies vice versa. If all “Iterations” are completed before defined “Duration”, the test will stop.
- In case you want to use uploaded JMeter script’s configuration, tick the checkbox next to each parameter.
Setting Network Type
Loadium let you choose different network types to simulate network behavior by simulating the bandwidth and network delays. There are many options:
They all have different bandwidth and network delay values. In case nothing is selected, by default Wifi is set to all engines.
In order to create a realistic performance test, tests needed to be run on different geolocations. Loadium let you select a geolocation according to your performance needs. When a network is chosen, Engines will be generated in that particular region and all request will come from that region.
In case you would like to be notified by an e-mail after the test ends, below checkbox must be chosen.
Step 2: Advanced Settings JMeter Properties
When a JMeter script is executed, execution is done with some predefined configurations. In order to override those configurations, you need to change some configurations by using Advanced Settings.
Every JMeter script creates a JTL file after its execution. That JTL files content is defined by JMeter.properties file and Loadium always executes the default one. You can change the JTL file’s content by using this option.
- For example, you want to change that JTL to save response headers, so you need to set JMeter.save.saveservice.responseHeaders to true
- You can also add additional command line parameters to your execution.
Important Note: Those values must be carefully made as they might corrupt the test and its results.
Step 3: APM Tools
Loadium is integrated with Application Performance Monitoring tools. As of today, Loadium is integrated with New Relic and App Dynamics. You should provide New Relic API key or App Dynamics’s credentials to Loadium. By doing so, you’ll be able to select which components and its metrics to monitor during test execution.
More than one APM tool can be added to a performance test. You may find detailed information on APM Integrations page.