Best approach to use groovy/grapes cache jar files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Best approach to use groovy/grapes cache jar files

Tong Sun
Hi,

- Most people would have some Java code to support JMeter test scripts.
- Those Java code would most probably need to be built on third party libs
- Those third party libs are downloaded and cached automatically by
groovy/grapes in its cache.

So the question is what is the best approach to use groovy/grapes
cache jar files?

I did some research but didn't find much good answers, the best one I found is

https://stackoverflow.com/questions/59398827/

which is as simple as providing JMeter a grapeConfig.xml file. But
that's all within the conversation -- I don't know where to find such
grapeConfig.xml, or how to generate one.

Anyway, the question/goal is what is the best approach to use
groovy/grapes cache jar files. thx

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Best approach to use groovy/grapes cache jar files

Mariusz W
Hi,
You can put java jar file in jmeter lib folder and after restart JMeter you
can use classes from this jar in jsr223 sampler in groovy script after
import.
I prefer building my supporting utils (java or groovy) in external IDE
project eg. IntelliJ (Gradle/Maven) and pack it as jar.

Regards,
Mariusz

On Wed, 23 Dec 2020 at 17:55, Tong Sun <[hidden email]> wrote:

> Hi,
>
> - Most people would have some Java code to support JMeter test scripts.
> - Those Java code would most probably need to be built on third party libs
> - Those third party libs are downloaded and cached automatically by
> groovy/grapes in its cache.
>
> So the question is what is the best approach to use groovy/grapes
> cache jar files?
>
> I did some research but didn't find much good answers, the best one I
> found is
>
> https://stackoverflow.com/questions/59398827/
>
> which is as simple as providing JMeter a grapeConfig.xml file. But
> that's all within the conversation -- I don't know where to find such
> grapeConfig.xml, or how to generate one.
>
> Anyway, the question/goal is what is the best approach to use
> groovy/grapes cache jar files. thx
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Best approach to use groovy/grapes cache jar files

Tong Sun
On Wed, Dec 23, 2020 at 12:22 PM Mariusz W <[hidden email]> wrote:
>
> Hi,
> You can put java jar file in jmeter lib folder and after restart JMeter you
> can use classes from this jar in jsr223 sampler in groovy script after
> import.

I have a huge list of third party jar files, and it'll be painful
doing it this way,

> I prefer building my supporting utils (java or groovy) in external IDE
> project eg. IntelliJ (Gradle/Maven) and pack it as jar.

You meant building one single fat jar to include them all, all those
third-party jar files?

> On Wed, 23 Dec 2020 at 17:55, Tong Sun <[hidden email]> wrote:
>
> > Hi,
> >
> > - Most people would have some Java code to support JMeter test scripts.
> > - Those Java code would most probably need to be built on third party libs
> > - Those third party libs are downloaded and cached automatically by
> > groovy/grapes in its cache.
> >
> > So the question is what is the best approach to use groovy/grapes
> > cache jar files?
> >
> > I did some research but didn't find much good answers, the best one I
> > found is
> >
> > https://stackoverflow.com/questions/59398827/
> >
> > which is as simple as providing JMeter a grapeConfig.xml file. But
> > that's all within the conversation -- I don't know where to find such
> > grapeConfig.xml, or how to generate one.
> >
> > Anyway, the question/goal is what is the best approach to use
> > groovy/grapes cache jar files. thx
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]