Skip to content

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.