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?
-
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.– RaoJan 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.– PolymorphicJan 14, 2017 at 11:47
1 Answer
The absolute majority of the load testing tools provide record-and-replay functionality so you can go the following way:
- 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
- Configure your WebDriver tests to use proxy from step 1, see Using a Proxy chapter of Selenium documentation for more information
- Run your Selenium test - load testing tool should be recording the associated HTTP requests
- Perform correlation and parameterisation if needed
- Add virtual users
- 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