0
votes

I have integrated all selenium scripts with Jmeter by exporting the selenium scripts into jar file and put in %Jmeter_Home%/lib/junit folder but when I am trying to execute these scripts in Jmeter using JUnit Request Sampler it shows error:

2017-07-19 18:34:55,433 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2017-07-19 18:34:55,433 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2017-07-19 18:34:55,435 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2017-07-19 18:34:55,637 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2017-07-19 18:34:55,637 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2017-07-19 18:34:55,637 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2017-07-19 18:34:55,637 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
2017-07-19 18:34:55,638 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2017-07-19 18:34:55,638 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2017-07-19 18:34:55,640 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2017-07-19 18:34:55,640 INFO o.a.j.p.j.s.JUnitSampler: Trying to find constructor with one String parameter returned error: Test_Scripts.testLogIn.<init>(java.lang.String)
2017-07-19 18:34:55,643 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
2017-07-19 18:34:55,643 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2017-07-19 18:34:55,643 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2017-07-19 18:34:55,643 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)
1

1 Answers

0
votes

Do you have the relevant Selenium dependencies in the JMeter classpath? If not, be aware that you need to provide them along with your .jar as JMeter isn't being shipped with any Selenium libraries. Also be informed that JMeter restart is required to pick the .jars up.

In the absolutely majority of cases WebDriver Sampler is much easier to use. It can be installed (including dependencies) using JMeter Plugins Manager