You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Elke <el...@trilobyte-se.de> on 2019/02/20 13:56:01 UTC
JMeter functions do not work in Java application
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
Re: JMeter functions do not work in Java application
Posted by "glinius@live.com" <gl...@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: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org