1

What I'm trying to do is running in JMeter some tests I made with Selenium Webdriver and JUnit. The steps I followed are:

  • after making the test in Eclipse I have made a .jar archive with the files and put it in JMeter ./lib/junit directory. I also added the selenium-server.jar to the ./lib directory
  • after this, in JMeter I added to the Test Plan classpath the test .jar and made a JUnit Request Sampler. Here I was able to see and select my test class name and test method. The problem is that when I click the Run button there is no browser starting and the test stops after a couple of seconds. It doesn't seem to do anything. The log contains the following:
2012/06/19 14:53:07 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2012/06/19 14:53:07 INFO - jmeter.testelement.TestPlan: add /home/x/apache-jmeter-2.7/lib/junit/jmeterTest.jar to classpath
2012/06/19 14:53:07 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2012/06/19 14:53:07 INFO - jmeter.engine.StandardJMeterEngine: Starting 2 threads for group Thread Group.
2012/06/19 14:53:07 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2012/06/19 14:53:07 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2012/06/19 14:53:07 INFO - jmeter.protocol.java.sampler.JUnitSampler: String constructor:: net.basic.SupplierViewTest.(java.lang.String)
2012/06/19 14:53:07 INFO - jmeter.protocol.java.sampler.JUnitSampler: String constructor:: net.basic.SupplierViewTest.(java.lang.String)
2012/06/19 14:53:07 INFO - jmeter.engine.StandardJMeterEngine: All threads have been started
2012/06/19 14:53:07 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2012/06/19 14:53:07 INFO - jmeter.engine.StandardJMeterEngine: Ending thread Thread Group 1-1
2012/06/19 14:53:07 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-2
2012/06/19 14:53:07 INFO - jmeter.protocol.java.sampler.JUnitSampler: String constructor:: net.basic.SupplierViewTest.(java.lang.String)
2012/06/19 14:53:07 INFO - jmeter.protocol.java.sampler.JUnitSampler: String constructor:: net.basic.SupplierViewTest.(java.lang.String)
2012/06/19 14:53:07 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-2
2012/06/19 14:53:07 INFO - jmeter.engine.StandardJMeterEngine: Ending thread Thread Group 1-2
2012/06/19 14:53:07 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2012/06/19 14:53:07 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
2012/06/19 14:53:07 INFO - jmeter.engine.StandardJMeterEngine: Test has ended on host null

I can't figure out what is happening and where is the problem, from the information I receive from JMeter. Does anyone have a clue about this or has tried successfully to make this work? Is there a step I'm missing? Thank you.

Maria

Aliaksandr Belik
  • 12,725
  • 6
  • 64
  • 90
Maria Lingo
  • 131
  • 1
  • 3
  • 1
    As far as I know, JMeter cannot do this. It does have a recorder that can capture low level user interactions with a site which you can parameterize, etc., but it won't run a selenium test. Even if you do manage to get it to run a selenium test, it is not what you want because you don't want the overhead of manipulating a browser in performance tests. You could try http://code.google.com/p/webkitdriver/ (but using JMeter in the usual way is probably best) – chrismead Jun 20 '12 at 01:11

1 Answers1

1

Look into this, maybe it will help you.

Community
  • 1
  • 1
Aliaksandr Belik
  • 12,725
  • 6
  • 64
  • 90