-
Notifications
You must be signed in to change notification settings - Fork 2
Import Results
Place your JMeter and data files in the project's jmeter
directory and edit the project's config/environment.rb
.
Define values for properties in the JMeter plan, the values themselves don't matter because Hailstorm is not going to control the JMeter execution.
You need to declare at least one cluster. The actual configuration values do not matter, but it must be declared inactive, because we don't need Hailstorm to control the cluster.
A complete example could look like:
Hailstorm.application.config do |config|
# JMeter Configuration
config.jmeter do |jmeter|
jmeter.properties do |props|
props['Num.threads'] = 300
props['Time.rampup'] = 10
end
end
config.clusters(:data_center) do |cluster|
cluster.machines = ['127.0.0.1']
cluster.user_name = 'joe'
cluster.ssh_identity = 'joe'
cluster.title = 'Localhost'
cluster.active = false
end
end
There are a couple of different ways to import the results depending on what you want done. Start the Hailstorm CLI:
script/hailstorm
If you have one or more log files, you can copy them to the project's log/import
directory. You will have to create
this directory first and the files need to have a .jtl
extension. Hailstorm will treat each log file as the output
of a test run and will create one test run for each log file.
hs > results import
You can add the absolute path of the log file if it is not in the default directory.
hs > results import /path/to/log/file.xml
You can specify some options to specify Hailstorm's behavior in some rare use cases -
-
jmeter
- specify the plan name (which is usually the file name minus the extension) if you have multiple JMeter plans in thejmeter
project directory. -
cluster
- specify the cluster code in case you have declared multiple clusters. The cluster code can be specified while declaring the cluster or it is a randomly generated Haiku. If you executeshow all
, the cluster code is displayed in the cluster information (see below). -
exec
- specify the execution id or test run id if you want the results to be attached to an existing test run rather than create a new one. For example, if you were running the same JMeter plan on multiple clusters in parallel, you will get multiple log files. You would want the first log file to create a new test run, and then specify the same test run id to add the other logs to the same test run.
hs > results import /path/to/log/file.xml cluster=holy-water-23 exec=3
hs > show all
...
All Clusters
===============================================================================
1] Amazon Cloud, region: us-east-1 (holy-water-23)
...
In the output above holy-water-23 is the cluster code.