简体   繁体   中英

how use tests written in Selenium and Cucumber-JVM with JMeter?

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

  1. Compile your tests into .jar file(s)
  2. Copy the .jar file(s) into JMeter classpath

    • tests files - under /lib/junit folder of your JMeter installation
    • dependency files - under /lib folder
  3. Add JUnit Request Sampler and choose required test from "Classname" and "Test Method" dropdowns
  4. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM