Skip to content

Import Results

Sayantam Dey edited this page Apr 11, 2020 · 2 revisions

Configuration

Place your JMeter and data files in the project's jmeter directory and edit the project's config/environment.rb.

JMeter

Define values for properties in the JMeter plan, the values themselves don't matter because Hailstorm is not going to control the JMeter execution.

Cluster

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.

Example

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

Import

There are a couple of different ways to import the results depending on what you want done. Start the Hailstorm CLI:

script/hailstorm

Default Directory

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

Path to File

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

Options

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 the jmeter 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 execute show 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

Cluster Code

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.