smicyk / groovy-jmeter

A Groovy-based DSL for building and running JMeter test plans from command line and more.
Apache License 2.0
13 stars 1 forks source link

[feature] test fragment for inclusion #49

Closed suntong closed 2 years ago

suntong commented 2 years ago

Hi, Interesting project that I just noticed today. Quick question,

Does groovy-jmeter support feature similiar to jmeter fragment so that people can define common scripts to be included in other scripts?

thx

smicyk commented 2 years ago

Hi,

currently there is no element which works as jmeter fragment and module controller.

The alternative to that is to use insert element which can include other script into your main script. The idea is similar but in reality it does not reference the fragment but includes its contents to main script. You can check examples folder to see it in action.

Hope that helps.

suntong commented 2 years ago

Ah, yes, that's a good workaround. and thanks for the fast response BTW.

Is there any plan to add support for jmeter fragment and module controller in near or far future?

We have built lots of common jmeter fragment scripts, if those can be supported it'll make the transition smoother...

smicyk commented 2 years ago

Hi, currently I don't have a plan to do it. The way how it works in jmeter makes it a little bit akward right now. Probably it needs some more rethinking to be usable.

suntong commented 2 years ago

OK, fair enough. Close it for now...