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.
-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 nyc.json file providing settings for
instrumentation (relative to cwd or use $/ for provided ones) (default:
"$/nyc.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
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
.