Running Ranorex Webtestit in CLI mode


#1

You can start Ranorex Webtestit in Command Line Interface (CLI) mode, without a User Interface (UI), in order to execute your project’s tests e.g on a Continuous Integration (CI) environment.

After installing Ranorex Webtestit, you can find the executables at the following locations:

  • Windows: %LOCALAPPDATA%\Programs\webtestit\Ranorex Webtestit.exe
  • Mac: /Applications/Ranorex\ Webtestit.app/Contents/MacOS/Ranorex\ Webtestit
  • Linux: webtestit

To run a Ranorex Webtestit project in CLI mode, open CMD( Windows) or terminal (MacOS, Linux) and type:

<Webtesit app path> run  [options]  <your project path>

See the Available commands below for further project run/open actions.

Available commands:

  • open <path> Open a project
  • run [options] <path> Run all tests of the project
    [options]:
    • --endpoints [endpoints]
      Filter endpoints by name
    • --endpoints-config [endpoints-config]
      Alternative endpoints config file path (absolute or relative to <path>)
    • --test-file-patterns [test-file-patterns]
      Define a pattern for test files to include in a testrun
      (glob patterns supported, relative to the project directory)
    • --include-inactive-endpoints
      Include inactive endpoints
    • --report-file-destination [report-path]
      Alternative report file destination (absolute or relative to <path>)
    • --report-file-name-pattern [file-name-pattern]
      File name pattern

It may happen that you try to run a project in the CLI mode, created with an older version of Ranorex Webtestit. Or you’re trying to run a project made with a newer version of our application, while still using an older one. In this case, you would get a warning like this:

b8ec55baf8a3f82aa50b923d7dcb3c736f942bef_1_690x161

As the message itself says, to migrate your project simply open it with Ranorex Webtestit and the migration will be performed automatically.

Error Codes

After the run, Ranorex Webtestit will return with an error code, which you can use in your CI environment to determine a fail or success for your build process.

  •     0 SUCCESS
  • 101 NO_RUNNABLE_PROJECT
  • 102 ROOT_PACKAGE_MISSING
  • 103 UNSUPPORTED_PROJECT_LANGUAGE
  • 301 FAILED_TO_READ_ENDPOINT_CONFIG
  • 302 MISSING_ENDPOINT_OBJECT_IN_PROVIDED_FILE
  • 303 MISSING_REQUIRED_ENDPOINT_FIELD
  • 304 WEBDRIVER_PROBLEM
  • 305 NO_VALID_ENDPOINTS
  • 306 BAD_JSON_IN_ENDPOINT_CONFIG
  • 400 TEST_FAILURES
  • 900 UNEXPECTED_ERROR

Running Ranorex Webtestit in Jenkins for Continuous Integration
Pass parameters to test-run and dataprovider
Credential management and Ranorex Webtestit
Running Ranorex Webtestit in TFS/VSTS for Continuous Integration
Creating Jenkins Job with Webtestit-- Do we have to specify the location of the json file?
Release notes v0.6.0
CLI Reporting-- Is PDF available?
CI with Jenkins and Webtestit
listed #2