JMeter functions do not work in Java application

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JMeter functions do not work in Java application

Elke
Dear all,

we are running JMeter tests from within a Java application. Test plans
are created and test runs are initiated programmatically, based on user
input.

Now we would like to build while loops with complex conditions like that:

${__groovy([not more than x iterations] && [last test failed] &&
[further condition])}

which means that we need a function, e.g. __groovy, to evaluate the
condition.

The problem is that we could not get the JMeter functions running in
this setting so far: the condition of the while loop is not evaluated
correctly, and we run into an infinite loop.

Running exactly the same test plan in the JMeter GUI the loop stops, as
expected, as soon as the condition evaluates to false.

We supposed that this is probably an issue of missing libraries.
However, importing ALL JMeter libraries did not solve the problem.


We are grateful for any idea!

Thank you in advance,

Elke Michalsky


--
Trilobyte Software Engineering GmbH
Schliemannstr. 45, 10437 Berlin
Geschäftsführer: Stefan Seide, Sven Gerhardt
Berlin, Amtsgericht Charlottenburg, HRB 103208

Reply | Threaded
Open this post in threaded view
|

Re: JMeter functions do not work in Java application

glinius@live.com
Double check that:

1. You're using  JMeter 5.0
<https://www.blazemeter.com/blog/what-is-new-jmeter-5>   (or whatever is the
latest version available at  JMeter Downloads
<https://jmeter.apache.org/download_jmeter.cgi>   page)
2. Your Java application has  ApacheJMeter_functions.jar
<https://mvnrepository.com/artifact/org.apache.jmeter/ApacheJMeter_functions>  
in its  CLASSPATH <https://en.wikipedia.org/wiki/Classpath_(Java)>  

Assuming above conditions are met you should be able to normally use JMeter
functions in your custom application.






--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

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