Skip to content

Migrate JMeter to k6

QualityMax can convert HTTP samplers in a JMeter .jmx test plan into a k6 JavaScript load test. The converter carries across request methods, URLs, request bodies, thread count, and ramp time where they can be represented safely.

  1. Open Performance in a QualityMax project and choose Convert to k6.
  2. Select JMeter (.jmx XML), choose the target test type, and paste the JMX source.
  3. Optionally set Override Target URL for a staging host.
  4. Convert, then review the equivalence score, notes, warnings, and unsupported features.
  5. Save the script to the project or copy it into your repository.
<ThreadGroup testname="Checkout users">
<stringProp name="ThreadGroup.num_threads">10</stringProp>
<stringProp name="ThreadGroup.ramp_time">30</stringProp>
<HTTPSamplerProxy testname="List products">
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.domain">staging.example.com</stringProp>
<stringProp name="HTTPSampler.path">/api/products</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
</HTTPSamplerProxy>
</ThreadGroup>
import http from 'k6/http';
import { check, sleep } from 'k6';
export const options = {
stages: [
{ duration: '30s', target: 10 },
{ duration: '3m', target: 10 },
{ duration: '30s', target: 0 },
],
thresholds: {
http_req_failed: ['rate<0.01'],
http_req_duration: ['p(95)<500'],
},
};
export default function () {
const response = http.get('https://staging.example.com/api/products');
check(response, { 'status is 200': (result) => result.status === 200 });
sleep(1);
}

Save this as products.js and run k6 run products.js against an approved environment.

QualityMax reports CSV data sets, Gaussian random timers, and listener configuration as unsupported. Custom headers, correlation, assertions, timers, variables, authentication, and setup or teardown logic still need a human parity review. Compare request counts and business outcomes on a short smoke run before increasing traffic, then keep the original JMX plan until the k6 result is repeatable.

Continue with performance testing for workload and threshold guidance.