JUnit Request Class not Found Exception

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

JUnit Request Class not Found Exception

MaxwellFalcon
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.
Reply | Threaded
Open this post in threaded view
|

Re: JUnit Request Class not Found Exception

Felix Schumacher


Am 09.10.2018 um 16:34 schrieb 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
> 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"
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
>
>
> Does anyone have any suggestions? Thank you for your time.
>


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