A simple JMeter Execution Framework

GitHubFor years I have been thinking of open sourcing the work I do. I see the Blog here as a simple part of that effort. The main -selfish- reason though is, so I don’t have to carry code around from A to B and I can safeguard it from someone claiming it as their own (even me). Open sourcing is something easier said than done. Especially if things are over a certain size and the things I do are usually very tailored to the project context, which makes it difficult to generalise.

But… all things have to start small. I have released WinMinoTaur on GitHub today. These are just some small Windows batch files but they make test execution life with JMeter a bit easier. You no longer depend on the UI to execute tests.

Best is to download the latest release here https://github.com/olivernz/WinMinoTaur/releases and follow the installation instructions.

The idea is to start the test from the command line (cmd), which allows you to encapsulate whole sequences of tests in your own batch files which could be triggered by the Windows scheduler if you want. The below is the main command that gets executed.

    runPerfTest.bat [Environment] [TestName] [Prefix] [LoadTime] [LoadShape] ([Note])
            [Environment] name of cfg file in config directory (no extension)
            [TestName] the name of the test (no extension)
            [Prefix] that the test results will have
            [LoadTime] in seconds
            [LoadShape] name of cfg file in config directory (no extension)
            [Note] Any note you need to pass with the test (OPTIONAL)

Executing tests like this will save all output in an orderly structure (directory tree by date)  and calculate results and graphs when the test has finished. Now you’d only need to copy and paste the results into Word (or similar) to make a nice report. The installation script generates a standard directory tree that makes it simple to maintain tests.

Also contained is a mechanism to abstract environments and test sizing (Threads/Timers) away into simple config files. i.e. less scripts to maintain (see examples). There is also an example on how to integrate external Groovy files.

I have refrained from using python/ruby/php… just to keep it as simple as possible. I don’t want to have to install any tools to make this work. If I learn Java at some point I might re-write (as Java is a pre-requisite for JMeter).

This is for the casual small JMeter project. It is not supposed to be fancy, complex or have all the bells and whistles. I have not tested this on distributed environments yet but I see no reason why that shouldn’t work too. The code is released under the Apache License 2.0.

And of course I welcome anyone to participate and add to this. Just use the GitHub process. If you find any issues or have a feature request (Tag: enhancement !) please use https://github.com/olivernz/WinMinoTaur/issues/new. If you are using it and it helped (or not) with what you did I’d appreciate a heads-up below in the comments.

WinMinoTaur is the small cousin of a much larger framework under Linux which is not open source (yet). It has been in development over the past 10y and it will take time to convert it as a lot of context related coding needs to be overhauled. It’s on the cards but I doubt you will see anything in 2016 but it’s definitely worth the wait 😉

by Oliver Erlewein

P.S. Also have a look at Taurus, which covers similar functionality and then some if you need something that might do a bit more and somewhat differently.


4 thoughts on “A simple JMeter Execution Framework

  1. Pingback: Testing Bits – 2/21/16 – 2/27/16 | Testing Curator Blog

  2. Pingback: Java Testing Weekly 9 / 2016

  3. Hello, I”m new to jMeter, I just installed the framework on to my personal laptop. I’m facing the below issue.. could you please help,

    message : kg.apc.jmeter.config.VariablesFromCSV
    cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassExceptio
    cause-message : kg.apc.jmeter.config.VariablesFromCSV
    class : org.apache.jorphan.collections.ListedHashTree
    required-type : org.apache.jorphan.collections.ListedHashTree
    converter-type : org.apache.jmeter.save.converters.HashTreeConverter
    path : /jmeterTestPlan/hashTree/hashTree/kg.apc.jmeter.config.Var
    line number : 67


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s