Command line usage¶
Use ui5-test-runner --help
to display the list of options. The mapping between v1 options and v2 can be found here.
Check additional information below.
Option | Mode | Description | Default Value |
---|---|---|---|
-V, --version | output the version number | ||
--capabilities | ๐งช | Capabilities tester for browser | |
-u, --url \ | ๐ | URL of the testsuite / page to test | |
-c, --cwd \ | ๐ป๐๐งช | Set working directory | current working directory |
--port \ | ๐ป๐๐งช | Port to use (0 to use any free one) | 0 |
-r, --report-dir \ | ๐ป๐๐งช | Directory to output test reports (relative to cwd) | "report" |
-pt, --page-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 \ | ๐ป๐๐งช | Number of parallel tests executions | 2 |
-b, --browser \ | ๐ป๐๐งช | Browser instantiation command (relative to cwd or use $/ for provided ones) | "$/puppeteer.js" |
--browser-args \ | ๐ป๐๐งช | Browser instantiation command parameters (use -- instead) | |
--alternate-npm-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 \ | ๐ป๐๐งช | Maximum waiting time for browser close | 2000 |
-br, --browser-retry \ | ๐ป๐๐งช | Browser instantiation retries : if the command fails unexpectedly, it is re-executed (0 means no retry) | 1 |
-oi, --output-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 \ | ๐ป๐ | Base folder of the web application (relative to cwd) | "webapp" |
-pf, --page-filter \ | ๐ป๐ | Filter out pages not matching the regexp | |
-pp, --page-params \ | ๐ป๐ | Add parameters to page URL | |
--page-close-timeout \ | ๐ป๐ | Maximum waiting time for page close | 250 |
-t, --global-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 | ๐ป๐ | Disable screenshots | |
-st, --screenshot-timeout \ | ๐ป๐ | Maximum waiting time for browser screenshot | 5000 |
-so, --split-opa [flag] | ๐ป๐ | Split OPA tests using QUnit modules | false |
-rg, --report-generator \ | ๐ป๐ | Report generator paths (relative to cwd or use $/ for provided ones) | ["$/report.js"] |
--progress-page \ | ๐ป๐ | Progress page path (relative to cwd or use $/ for provided ones) | "$/report/default.html" |
--coverage [flag] | ๐ป๐ | Enable or disable code coverage | |
--no-coverage | ๐ป๐ | Disable code coverage | |
-cs, --coverage-settings \ | ๐ป๐ | 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 \ | ๐ป๐ | Directory to output raw coverage information to (relative to cwd) | ".nyc_output" |
-crd, --coverage-report-dir \ | ๐ป๐ | Directory to store the coverage report files (relative to cwd) | "coverage" |
-cr, --coverage-reporters \ | ๐ป๐ | List of nyc reporters to use (text is always used) | ["lcov","cobertura"] |
-ccb, --coverage-check-branches \ | ๐ป๐ | What % of branches must be covered | 0 |
-ccf, --coverage-check-functions \ | ๐ป๐ | What % of functions must be covered | 0 |
-ccl, --coverage-check-lines \ | ๐ป๐ | What % of lines must be covered | 0 |
-ccs, --coverage-check-statements \ | ๐ป๐ | What % of statements must be covered | 0 |
-crs, --coverage-remote-scanner \ | ๐ป๐ | Scan for files when all coverage is requested | "$/scan-ui5.js" |
-s, --serve-only [flag] | ๐ป๐ | Serve only | false |
--ui5 \ | ๐ป | UI5 url | "https://ui5.sap.com" |
--disable-ui5 [flag] | ๐ป | Disable UI5 mapping (also disable libs) | false |
--libs \ | ๐ป | Library mapping (\ | |
--mappings \ | ๐ป | Custom mapping (\ | |
--cache \ | ๐ป | Cache UI5 resources locally in the given folder (empty to disable) | |
--preload \ | ๐ป | Preload UI5 libraries in the cache folder (only if --cache is used) | |
--testsuite \ | ๐ป | 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 |
--start \ | ๐ | Start command (might be an NPM script or a shell command) | |
--start-timeout \ | ๐ | Maximum waiting time for the start command (based on when the first URL becomes available) | 5000 |
-cp, --coverage-proxy [flag] | ๐ | [โ ๏ธ experimental] use internal proxy to instrument remote files | false |
-cpi, --coverage-proxy-include \ | ๐ | [โ ๏ธ experimental] urls to instrument for coverage | ".*" |
-cpe, --coverage-proxy-exclude \ | ๐ | [โ ๏ธ experimental] urls to ignore for coverage | "/((test-)?resources\|tests?)/" |
-h, --help | display help for command | ||
Meaning of option values :
[value]
: value is optional (usually boolean)<value>
: value is expected<value...>
: more than one value can be set<timeout>
: expressed either as a single numeric (ms) or with the following suffixes :<number>
ms<number>s
or<number>sec
for seconds<number>m
or<number>min
for minutes
Options availability depends on the mode :
- ๐ป when serving and testing (legacy mode)
- ๐ when testing remote pages (
--url
) - ๐งช when testing browser capabilities (
--capabilities
)
For browser arguments, it is recommended to use --
and pass them after. In the configuration file, use browserArgs
.