1 | # UI5 Test runner
|
2 |
|
3 | [![Node.js CI](https://github.com/ArnaudBuchholz/ui5-test-runner/actions/workflows/node.js.yml/badge.svg)](https://github.com/ArnaudBuchholz/ui5-test-runner/actions/workflows/node.js.yml)
|
4 | [![Package Quality](https://npm.packagequality.com/shield/ui5-test-runner.svg)](https://packagequality.com/#?package=ui5-test-runner)
|
5 | [![Known Vulnerabilities](https://snyk.io/test/github/ArnaudBuchholz/ui5-test-runner/badge.svg?targetFile=package.json)](https://snyk.io/test/github/ArnaudBuchholz/ui5-test-runner?targetFile=package.json)
|
6 | [![ui5-test-runner](https://badge.fury.io/js/ui5-test-runner.svg)](https://www.npmjs.org/package/ui5-test-runner)
|
7 | [![PackagePhobia](https://img.shields.io/badge/%F0%9F%93%A6package-phobia-lightgrey)](https://packagephobia.com/result?p=ui5-test-runner)
|
8 | [![MIT License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
|
9 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FArnaudBuchholz%2Fui5-test-runner.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FArnaudBuchholz%2Fui5-test-runner?ref=badge_shield)
|
10 | [![Documentation](https://img.shields.io/badge/-%F0%9F%93%9Adocumentation-blueviolet)](https://arnaudbuchholz.github.io/ui5-test-runner/)
|
11 |
|
12 | A self-sufficient test runner for UI5 applications enabling parallel execution of tests.
|
13 |
|
14 | > 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.
|
15 |
|
16 | > This tool is designed and built as a **substitute** of the [UI5 karma runner](https://github.com/SAP/karma-ui5). It executes all the tests in **parallel** thanks to several browser instances *(which also **reduces the total execution time**)*.
|
17 |
|
18 | ## 📚 [Documentation](https://arnaudbuchholz.github.io/ui5-test-runner/)
|
19 |
|
20 |
|
21 | ## 💿 How to install
|
22 |
|
23 | * Works with [Node.js](https://nodejs.org/en/download/) >= 16
|
24 | * Local installation
|
25 | * `npm install --save-dev ui5-test-runner`
|
26 | * Trigger either with `npx ui5-test-runner` or through an npm script invoking `ui5-test-runner`
|
27 | * Global installation
|
28 | * `npm install --global ui5-test-runner`
|
29 | * Trigger with `ui5-test-runner`
|
30 |
|
31 | **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**.
|
32 |
|
33 | ## 🖥️ How to demo
|
34 |
|
35 | * Clone the project [training-ui5con18-opa](https://github.com/ArnaudBuchholz/training-ui5con18-opa) and run `npm install`
|
36 | * Use `npm run karma` to test with the karma runner
|
37 | * *Serving the application (a.k.a. legacy mode)*
|
38 | * `npx ui5-test-runner --port 8081 --ui5 https://ui5.sap.com/1.109.0/ --cache .ui5 --keep-alive`
|
39 | * Follow the progress of the test executions using http://localhost:8081/_/progress.html
|
40 | * When the tests are completed, check the code coverage with http://localhost:8081/_/coverage/lcov-report/index.html
|
41 | * *Serving the application with `@ui5/cli`*
|
42 | * Use `npm start` to serve the application with `@ui5/cli`
|
43 | * `npx ui5-test-runner --port 8081 --url http://localhost:8080/test/testsuite.qunit.html --keep-alive`
|
44 | * Follow the progress of the test executions using http://localhost:8081/_/progress.html
|
45 |
|
46 |
|
47 | ## ⚖️ License
|
48 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FArnaudBuchholz%2Fui5-test-runner.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FArnaudBuchholz%2Fui5-test-runner?ref=badge_large)
|
49 |
|
50 | ## ⚠️ Breaking changes
|
51 |
|
52 | ### v3
|
53 | * Dropping support of Node.js 14
|
54 |
|
55 | ### v2
|
56 |
|
57 | * Command line **parameters** as well as configuration file **syntax** have changed
|
58 | * Dependencies are installed **on demand**
|
59 | * Browser instantiation command evolved in an **incompatible way** (see [documentation](https://arnaudbuchholz.github.io/ui5-test-runner/browser.html)).
|
60 | * Output is different (report, traces)
|