In this tutorial, we will show you how to use Neocortix Cloud Services Scalable Compute to run a distributed LoadTest batch job, using a JMeter
client, while monitoring the server with Dynatrace.
Next, please follow the steps in the tutorial Setting Up For Batch Jobs
After completion of the initial setup, you will have a directory with examples,
In the subdirectory
you will find the runBatchDynatrace.py
This script creates a set of instances running on mobile devices, one instance for each load generator.
In the default example provided, we ask for 6 successful instances:
startFrame = 1,
endFrame = 6,
nWorkers = 10,
nWorkers = 10
, we slightly over-allocate instances to allow for some fraction to fail.
It will command the instances to install JMeter, and then run JMeter with a short (90 seconds) and simple
to send http
requests to the target URL (currently
def frameCmd( self, frameNum ):
cmd = 'date && apache-jmeter-5.3/bin/jmeter -n -t %s -l TestPlan_results_%03d.csv -D httpclient4.time_to_live=20000 -D httpclient.reset_state_on_thread_group_iteration=true' % (
cmd += ' && cp -p jmeter.log jmeter_%03d.log' % frameNum
The output of each instance will be
a .csv file
containing request response timing information for each worker. The master will create several
and then terminate the instances.
Now you will configure
. After signing up for Dynatrace, you need to create an API access token by clicking on Left-Menu / Settings / Integration / Dynatrace API / Generate Token. Select the API v2 Ingest Metrics feature as shown:
Copy the generated token and then paste it into the
in place of the "YourApiToken" placeholder. This field is called "dynatraceApiToken".
Next you need to set the "dynatraceMetricIngestUrl" field. When you signed up for dynatrace, they gave you a "monitoring instance" with a URL something like
. You will find it in the browser address bar:
file, find where it says
and replace the host part with the host part of your monitoring instance URL.
To test your own server, replace all occurrences of
with the URL of the web page you want to test (omitting the "https://" prefix).