A self-sufficient test runner for UI5 applications enabling parallel execution of tests.
To put it in a nutshell, some UI5 applications have so many tests that when you run them in a browser, it ends up crashing. The main reason is memory consumption : the browser process goes up to 2 GB and it blows up. JavaScript is based on garbage collecting but it needs time to operate and the stress caused by executing the tests as well as the use of iframes do not let enough bandwidth for the browser to free up the memory.
This tool is designed and built as a substitute of the UI5 karma runner. It executes all the tests in parallel thanks to several browser instances (which also reduces the total execution time).
- Works with Node.js >= 14
- Local installation
npm install --save-dev ui5-test-runner
- Trigger either with
npx ui5-test-runner
or through an npm script invokingui5-test-runner
- Global installation
npm install --global ui5-test-runner
- Trigger with
ui5-test-runner
NOTE : additional packages might be needed during the execution (puppeteer
, selenium-webdriver
, nyc
...) . If they are found installed locally in the tested project, they are used. Otherwise, they are installed globally.
- Clone the project training-ui5con18-opa and run
npm install
- Use
npm run karma
to test with the karma runner - Serving the application (a.k.a. legacy mode)
npx ui5-test-runner --port 8081 --ui5 https://ui5.sap.com/1.109.0/ --cache .ui5 --keep-alive
- Follow the progress of the test executions using http://localhost:8081/_/progress.html
- When the tests are completed, check the code coverage with http://localhost:8081/_/coverage/lcov-report/index.html
- Serving the application with
@ui5/cli
- Use
npm start
to serve the application with@ui5/cli
npx ui5-test-runner --port 8081 --url http://localhost:8080/test/testsuite.qunit.html --keep-alive
- Follow the progress of the test executions using http://localhost:8081/_/progress.html
- Use
- Command line parameters as well as configuration file syntax have changed
- Dependencies are installed on demand
- Browser instantiation command evolved in an incompatible way (see documentation).
- Output is different (report, traces)