I have set of functional tests written in Selenium and Cucumber-JVM, I use maven to run them by Cucumber tags.
Now I need to use some of those tests with JMeter to check performance. How can I do it?
I believe that you can just
- Compile your tests into .jar file(s)
Copy the .jar file(s) into JMeter classpath
- tests files - under /lib/junit folder of your JMeter installation
- dependency files - under /lib folder
- Add JUnit Request Sampler and choose required test from "Classname" and "Test Method" dropdowns
- Configure JMeter as per your load scenario and run the test
See How to Use JUnit With JMeter guide for details on working with JUnit tests from JMeter perspective.
You can use JMeter sampler called BSF Sampler. This one allows to execute java class from JMeter. Please choose beanshell in the scripting language field.
来源:https://stackoverflow.com/questions/29198467/how-use-tests-written-in-selenium-and-cucumber-jvm-with-jmeter