r_31415
r_31415

Reputation: 8982

Alternatives to JMeter for POST requests with different parameters (must work without GUI)

As far as I know, JMeter allows you to send multiple POST request with different parameters (e.g. { "value": "value1"}, {"value": "value2"}, ...) However, I'm more comfortable using a terminal-based interface similar to ab or siege. Basically, I need to load test a server simulating the case in which some requests are not previously cached.

Are there alternatives to JMeter for Linux that are able to use different parameters for a POST request?

UPDATE

As far as I can tell, JMeter requires the creation of a test plan (jmx file) in order to run via the command line. Unfortunately, this test plan needs to be built using the GUI, which is precisely what I want to avoid.

UPDATE 2

I will use JMeter because it offers dynamic parameters for POST requests and most alternatives depend on JMeter. However, if anyone knows of a standalone library that works exclusively from the terminal (similar to ab), please let me know.

Upvotes: 2

Views: 1169

Answers (2)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34526

you can use JMeter in terminal mode, it's called Non GUI mode.

To variabilize just use CsV dataset to load variables (varName for example )per thread, then use ${varName}

See :

Nice report at end:

If you don't want to use GUI even for building the test, then look at :

It allows you to generate the JMX from a DSL file.

Examples here:

DSL here:

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
  require 'ruby-jmeter'
  test do
    csv_data_set_config name:'MyCsv', filename: '/path to file', variableNames: 'myParam'
    threads count: 10 do
      visit name: 'Qwant Search', url: 'https://lite.qwant.com/?q=flood.io&t=web&p=${myParam}'
    end
  end.jmx(file: "path to your output plan")

Save file to ruby-jmeter-csv.rb You can then generate the plan with:

ruby ruby-jmeter-csv.rb

And run it in non gui mode.

Upvotes: 2

Dmitri T
Dmitri T

Reputation: 168072

In fact JMeter GUI should be used for tests development and debugging only, when it comes to running the load test - it is recommended to run JMeter in command line mode, via Ant task or Maven plugin. Also there is a couple of more "geek" alternatives, i.e.:

  • JMeter .jmx scripts are basically XML files so you can use your favourite text editor to create or amend them
  • You can use JMeter API to create and kick off JMeter tests using Java language

If you're still looking for an alternative, here are few free and open source load testing tools

  • Grinder - you can write scripts in Jython
  • Gatling - you can write scripts in Scala-based DSL
  • Tsung - this guy exists for Linux and Unix-based platforms only, Erlang-based. Scripts are XML files.
  • Taurus - automation framework which supports all aforementioned tools (and some more), Python based, configuration files have simple YAML syntax.

See Open Source Load Testing Tools: Which One Should You Use? for more information on the above tools and comparison of them with JMeter

Upvotes: 1

Related Questions