Convert Jmeter test to K6


I am using GitHub - grafana/jmeter-to-k6: Converts JMeter .jmx files to k6 JS code to convert existing Jmeter test to K6. But i am getting below error while converting.

Can somebody help on this?

Hi @apal,

the jmeter-to-k6 project is archived, in no small parts because it’s quite a lot to support jmeter to k6 conversion. Also, because things don’t map all that well, from what I heard from other people - I have not worked on it myself.

You seem to be hitting the fact that the property controlledByThreadGroup for the CookieManager in jmeter is not supported in jmeter-to-k6. Here is the code in question with the supported properties.

I don’t know enough of jmeter to tell you what that property does, but unless you need it particularly - you can just remove it from your jmeter configuration … or change jmeter-to-k6 to ignore it.

The above has every chance that will just lead to another error later on, and I can’t tell you how many such ones you will hit before you can get your jmeter test transformed. And arguably more important whether that test than will do what you want.

Hope this helps you

Hi @mstoykov

Thanks for reply. Code I have already seen but its hard to modify as i don’t know the overall flow. So yes can’t do much and will not use this tool.

if the .jmx code is too big that you dont want to manually convert everything, then removing (cut and paste somewhere else for later purpose) some snippets of code that is giving error would help you in converting to .js format with the basic structure. and then add relevant js code of removed .jmx code.

Finally check every logic in .jmx is relevant with .js manually, as manual intervention cant be avoided for sure.

It worked in some cases for me. Hope it helps :slight_smile: