1

We have some end-to-end tests written using WebDriverIO, and mochajs for a web application. Is there a way or tool to reuse these tests in order to create some load tests with various configuration?

2
  • You may not be really interested in all those configurations required for functional tests and apply that to performance tests. May be you can create simple tests in Jmeter.
    – Rao
    Jan 12, 2017 at 1:08
  • @Rao I want my load tests to be as close as possible to real use cases and scenarios. Actually I can disable asserts in my functional tests in config, so that they become free of functional assertions. What remains in scenarios are some real use cases which can be repeated by some virtual users. Jan 14, 2017 at 11:47

1 Answer 1

1

The absolute majority of the load testing tools provide record-and-replay functionality so you can go the following way:

  1. Recording of HTTP-based applications is usually done via HTTP proxy, so you will need to start the proxy server which should be included in your load testing tool distribution
  2. Configure your WebDriver tests to use proxy from step 1, see Using a Proxy chapter of Selenium documentation for more information
  3. Run your Selenium test - load testing tool should be recording the associated HTTP requests
  4. Perform correlation and parameterisation if needed
  5. Add virtual users
  6. Run your test

For example, Apache JMeter is a free and open source load testing tool and this is How to Convert Selenium Scripts into the JMX Converter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.