Skip to content

Commit

Permalink
feat: improve usage documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBuchholz committed Jan 16, 2025
1 parent a764342 commit ddfa3f2
Showing 1 changed file with 58 additions and 81 deletions.
139 changes: 58 additions & 81 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,87 +4,64 @@ Use `ui5-test-runner --help` to display the list of options. The mapping between

Check additional information below.

```text
-V, --version output the version number
--capabilities 🧪 Capabilities tester for browser
-u, --url <url...> 🔗 URL of the testsuite / page to test
-c, --cwd <path> [💻🔗🧪] Set working directory (default: current working directory)
--port <port> [💻🔗🧪] Port to use (0 to use any free one) (default: 0)
-r, --report-dir <path> [💻🔗🧪] Directory to output test reports (relative to cwd) (default:
"report")
-pt, --page-timeout <timeout> [💻🔗🧪] Limit the page execution time, fails the page if it takes
longer than the timeout (0 means no timeout) (default: 0)
-f, --fail-fast [flag] [💻🔗🧪] Stop the execution after the first failing page (default:
false)
-fo, --fail-opa-fast [flag] [💻🔗] Stop the OPA page execution after the first failing test
(default: false)
-k, --keep-alive [flag] [💻🔗🧪] Keep the server alive (default: false)
-l, --log-server [flag] [💻🔗🧪] Log inner server traces (default: false)
-p, --parallel <count> [💻🔗🧪] Number of parallel tests executions (default: 2)
-b, --browser <command> [💻🔗🧪] Browser instantiation command (relative to cwd or use $/ for
provided ones) (default: "$/puppeteer.js")
--browser-args <argument...> [💻🔗🧪] Browser instantiation command parameters (use -- instead)
--alternate-npm-path <path> [💻🔗] Alternate NPM path to look for packages (priority: local,
alternate, global)
--no-npm-install [💻🔗🧪] Prevent any NPM install (execution may fail if a dependency is
missing)
-bt, --browser-close-timeout <timeout> [💻🔗🧪] Maximum waiting time for browser close (default: 2000)
-br, --browser-retry <count> [💻🔗🧪] Browser instantiation retries : if the command fails
unexpectedly, it is re-executed (0 means no retry) (default: 1)
-oi, --output-interval <interval> [💻🔗🧪] Interval for reporting progress on non interactive output
(CI/CD) (0 means no output) (default: 30000)
--offline [💻🔗🧪] Limit network usage (implies --no-npm-install) (default: false)
--webapp <path> [💻🔗] Base folder of the web application (relative to cwd) (default:
"webapp")
-pf, --page-filter <regexp> [💻🔗] Filter out pages not matching the regexp
-pp, --page-params <params> [💻🔗] Add parameters to page URL
--page-close-timeout <timeout> [💻🔗] Maximum waiting time for page close (default: 250)
-t, --global-timeout <timeout> [💻🔗] Limit the pages execution time, fail the page if it takes longer
than the timeout (0 means no timeout) (default: 0)
--screenshot [flag] [💻🔗] Take screenshots during the tests execution (if supported by the
browser) (default: true)
--no-screenshot [💻🔗] Disable screenshots
-st, --screenshot-timeout <timeout> [💻🔗] Maximum waiting time for browser screenshot (default: 5000)
-so, --split-opa [💻🔗] Split OPA tests using QUnit modules (default: false)
-rg, --report-generator <path...> [💻🔗] Report generator paths (relative to cwd or use $/ for provided
ones) (default: ["$/report.js"])
--progress-page <path> [💻🔗] Progress page path (relative to cwd or use $/ for provided ones)
(default: "$/report/default.html")
--coverage [flag] [💻🔗] Enable or disable code coverage
--no-coverage [💻🔗] Disable code coverage
-cs, --coverage-settings <path> [💻🔗] Path to a custom .nycrc.json file providing settings for
instrumentation (relative to cwd or use $/ for provided ones) (default:
"$/.nycrc.json")
-ctd, --coverage-temp-dir <path> [💻🔗] Directory to output raw coverage information to (relative to cwd)
(default: ".nyc_output")
-crd, --coverage-report-dir <path> [💻🔗] Directory to store the coverage report files (relative to cwd)
(default: "coverage")
-cr, --coverage-reporters <reporter...> [💻🔗] List of nyc reporters to use (text is always used) (default:
["lcov","cobertura"])
-ccb, --coverage-check-branches <percent> [💻🔗] What % of branches must be covered (default: 0)
-ccf, --coverage-check-functions <percent> [💻🔗] What % of functions must be covered (default: 0)
-ccl, --coverage-check-lines <percent> [💻🔗] What % of lines must be covered (default: 0)
-ccs, --coverage-check-statements <percent> [💻🔗] What % of statements must be covered (default: 0)
-crs, --coverage-remote-scanner <path> [💻🔗] Scan for files when all coverage is requested (default:
"$/scan-ui5.js")
-s, --serve-only [flag] [💻🔗] Serve only (default: false)
--ui5 <url> [💻] UI5 url (default: "https://ui5.sap.com")
--disable-ui5 [💻] Disable UI5 mapping (also disable libs) (default: false)
--libs <lib...> [💻] Library mapping (<relative>=<path> or <path>)
--mappings <mapping...> [💻] Custom mapping (<match>=<file|url>(<config>))
--cache <path> [💻] Cache UI5 resources locally in the given folder (empty to disable)
--preload <library...> [💻] Preload UI5 libraries in the cache folder (only if --cache is used)
--testsuite <path> [💻] Path of the testsuite file (relative to webapp, URL parameters are
supported) (default: "test/testsuite.qunit.html")
-w, --watch [flag] [💻] Monitor the webapp folder and re-execute tests on change (default:
false)
-cp, --coverage-proxy [flag] [🔗] [⚠️ experimental] use internal proxy to instrument remote files
(default: false)
-cpi, --coverage-proxy-include <regexp> [🔗] [⚠️ experimental] urls to instrument for coverage (default: ".*")
-cpe, --coverage-proxy-exclude <regexp> [🔗] [⚠️ experimental] urls to ignore for coverage (default:
"/((test-)?resources|tests?)/")
-h, --help display help for command
```
| Option | Mode | Description | Default Value |
|-|-|-|-|
|-V, --version||output the version number||
|--capabilities|🧪|Capabilities tester for browser||
|-u, --url \<url...>|🔗|URL of the testsuite / page to test||
|-c, --cwd \<path>|💻🔗🧪|Set working directory|`current working directory`|
|--port \<port>|💻🔗🧪|Port to use (0 to use any free one)|`0`|
|-r, --report-dir \<path>|💻🔗🧪|Directory to output test reports (relative to cwd)|`"report"`|
|-pt, --page-timeout \<timeout>|💻🔗🧪|Limit the page execution time, fails the page if it takes longer than the timeout (0 means no timeout)|`0`|
|-f, --fail-fast [flag]|💻🔗🧪|Stop the execution after the first failing page|`false`|
|-fo, --fail-opa-fast [flag]|💻🔗|Stop the OPA page execution after the first failing test|`false`|
|-k, --keep-alive [flag]|💻🔗🧪|Keep the server alive|`false`|
|-l, --log-server [flag]|💻🔗🧪|Log inner server traces|`false`|
|-p, --parallel \<count>|💻🔗🧪|Number of parallel tests executions|`2`|
|-b, --browser \<command>|💻🔗🧪|Browser instantiation command (relative to cwd or use $/ for provided ones)|`"$/puppeteer.js"`|
|--browser-args \<argument...>|💻🔗🧪|Browser instantiation command parameters (use -- instead)||
|--alternate-npm-path \<path>|💻🔗|Alternate NPM path to look for packages (priority: local, alternate, global)||
|--no-npm-install [flag]|💻🔗🧪|Prevent any NPM install (execution may fail if a dependency is missing)||
|-bt, --browser-close-timeout \<timeout>|💻🔗🧪|Maximum waiting time for browser close|`2000`|
|-br, --browser-retry \<count>|💻🔗🧪|Browser instantiation retries : if the command fails unexpectedly, it is re-executed (0 means no retry)|`1`|
|-oi, --output-interval \<interval>|💻🔗🧪|Interval for reporting progress on non interactive output (CI/CD) (0 means no output)|`30000`|
|--offline [flag]|💻🔗🧪|Limit network usage (implies --no-npm-install)|`false`|
|--webapp \<path>|💻🔗|Base folder of the web application (relative to cwd)|`"webapp"`|
|-pf, --page-filter \<regexp>|💻🔗|Filter out pages not matching the regexp||
|-pp, --page-params \<params>|💻🔗|Add parameters to page URL||
|--page-close-timeout \<timeout>|💻🔗|Maximum waiting time for page close|`250`|
|-t, --global-timeout \<timeout>|💻🔗|Limit the pages execution time, fail the page if it takes longer than the timeout (0 means no timeout)|`0`|
|--screenshot [flag]|💻🔗|Take screenshots during the tests execution (if supported by the browser)|`true`|
|--no-screenshot [flag]|💻🔗|Disable screenshots||
|-st, --screenshot-timeout \<timeout>|💻🔗|Maximum waiting time for browser screenshot|`5000`|
|-so, --split-opa [flag]|💻🔗|Split OPA tests using QUnit modules|`false`|
|-rg, --report-generator \<path...>|💻🔗|Report generator paths (relative to cwd or use $/ for provided ones)|`["$/report.js"]`|
|--progress-page \<path>|💻🔗|Progress page path (relative to cwd or use $/ for provided ones)|`"$/report/default.html"`|
|--coverage [flag]|💻🔗|Enable or disable code coverage||
|--no-coverage [flag]|💻🔗|Disable code coverage||
|-cs, --coverage-settings \<path>|💻🔗|Path to a custom .nycrc.json file providing settings for instrumentation (relative to cwd or use $/ for provided ones)|`"$/.nycrc.json"`|
|-ctd, --coverage-temp-dir \<path>|💻🔗|Directory to output raw coverage information to (relative to cwd)|`".nyc_output"`|
|-crd, --coverage-report-dir \<path>|💻🔗|Directory to store the coverage report files (relative to cwd)|`"coverage"`|
|-cr, --coverage-reporters \<reporter...>|💻🔗|List of nyc reporters to use (text is always used)|`["lcov","cobertura"]`|
|-ccb, --coverage-check-branches \<percent>|💻🔗|What % of branches must be covered|`0`|
|-ccf, --coverage-check-functions \<percent>|💻🔗|What % of functions must be covered|`0`|
|-ccl, --coverage-check-lines \<percent>|💻🔗|What % of lines must be covered|`0`|
|-ccs, --coverage-check-statements \<percent>|💻🔗|What % of statements must be covered|`0`|
|-crs, --coverage-remote-scanner \<path>|💻🔗|Scan for files when all coverage is requested|`"$/scan-ui5.js"`|
|-s, --serve-only [flag]|💻🔗|Serve only|`false`|
|--ui5 \<url>|💻|UI5 url|`"https://ui5.sap.com"`|
|--disable-ui5 [flag]|💻|Disable UI5 mapping (also disable libs)|`false`|
|--libs \<lib...>|💻|Library mapping (\<relative>=\<path> or \<path>)||
|--mappings \<mapping...>|💻|Custom mapping (\<match>=\<file\|url>(\<config>))||
|--cache \<path>|💻|Cache UI5 resources locally in the given folder (empty to disable)||
|--preload \<library...>|💻|Preload UI5 libraries in the cache folder (only if --cache is used)||
|--testsuite \<path>|💻|Path of the testsuite file (relative to webapp, URL parameters are supported)|`"test/testsuite.qunit.html"`|
|-w, --watch [flag]|💻|Monitor the webapp folder and re-execute tests on change|`false`|
|-cp, --coverage-proxy [flag]|🔗|[⚠️ experimental] use internal proxy to instrument remote files|`false`|
|-cpi, --coverage-proxy-include \<regexp>|🔗|[⚠️ experimental] urls to instrument for coverage|`".*"`|
|-cpe, --coverage-proxy-exclude \<regexp>|🔗|[⚠️ experimental] urls to ignore for coverage|`"/((test-)?resources\|tests?)/"`|
|-h, --help||display help for command ||
|||||

Meaning of option values :

Expand Down

0 comments on commit ddfa3f2

Please sign in to comment.