Discussion:
JUnit Request Class not Found Exception
Maxwell Falcon
2018-10-09 14:34:13 UTC
Permalink
Hello,

I am trying to run some JMeter tests through Jenkins using a docker
instance. I am not using the Maven plugin as I see some other users
doing. I can run my tests locally with no error.

Right now I have Jenkins checking out a repo. In the build stage I am
building the project into a .jar file and then moving that .jar file into
the /lib/junit library found on the docker instance. Then I run the
tests.

In the jmeter log file I get this warning every time I attempt to run a
test:

jmeter.protocol.java.sampler.JUnitSampler: ClassNotFoundException::
JMeterCommunityTests.JMeterLoginTests

In the tests results file (.xml) I have this:
rm="Failed to create an instance of the class:JMeterLoginTests,
reasons may be missing both empty constructor and one String
constructor or failure to instantiate constructor, check warning
messages in jmeter log file"


Does anyone have any suggestions? Thank you for your time.
Felix Schumacher
2018-10-13 12:32:27 UTC
Permalink
Post by Maxwell Falcon
Hello,
I am trying to run some JMeter tests through Jenkins using a docker
instance. I am not using the Maven plugin as I see some other users
doing. I can run my tests locally with no error.
Right now I have Jenkins checking out a repo. In the build stage I am
building the project into a .jar file and then moving that .jar file into
the /lib/junit library found on the docker instance. Then I run the
tests.
In the jmeter log file I get this warning every time I attempt to run a
JMeterCommunityTests.JMeterLoginTests
rm="Failed to create an instance of the class:JMeterLoginTests,
reasons may be missing both empty constructor and one String
constructor or failure to instantiate constructor, check warning
messages in jmeter log file"
Have you had a look at your junit classes? They must have an empty
constructor and a constructor with a string, as the message indicates.

Regards,
 Felix
Post by Maxwell Falcon
Does anyone have any suggestions? Thank you for your time.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@jmeter.apache.org
For additional commands, e-mail: user-***@jmeter.apache.org

Loading...