Introducing our new CEO Don Johnson - Read More

loadimpact/jmeter-to-k6

By loadimpact

Updated over 4 years ago

Convert JMeter .jmx files to k6 JavaScript for load and performance testing.

Image
1

963

Converts a JMeter .jmx file into the equivalent k6 JavaScript file for load and performance testing.

Features

The following JMeter features are supported in the conversion:

  • Config
    • TestPlan
    • ConfigTestElement
    • kg.apc.jmeter.threads.SteppingThreadGroup
    • ThreadGroup
  • Managers
    • DNSCacheManager
    • HeaderManager
    • CookieManager
    • AuthManager
  • Assertions
    • com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion
    • DurationAssertion
    • ResponseAssertion
    • XPathAssertion
  • Logic controllers
    • ForeachController
    • GenericController
    • IfController
    • InterleaveControl
    • LoopController
    • OnceOnlyController
    • WhileController
    • RunTimeController
    • TransactionController
    • SimpleController
    • RandomController
  • Timers
    • ConstantTimer
  • Data
    • CSVDataSet
    • Arguments
  • Post-processors
    • JSONPostProcessor
    • BoundaryExtractor
    • com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
    • HtmlExtractor/CSSSelectorExtractor
    • RegexExtractor
    • ResultStatusActionHandler
    • XPathExtractor

Usage

If you have a JMeter .jmx file located at /path/to/jmeter-files/MyTest.jmx, you use the Docker container as follows:

docker run -it -v "/path/to/jmeter-files/:/output/" loadimpact/jmeter-to-k6 /output/MyTest.jmx -o /output/MyTestOutput

After the conversion, you can run the resulting k6 test script as follows:

k6 run /path/to/jmeter-files/MyTestOutput/test.js

Docker Pull Command

docker pull loadimpact/jmeter-to-k6