Aller au contenu

ranorex

ranorex/ranorex@v1

Run a Ranorex test suite.

solution, solution_file and project are mandatory parameters. The test_suite and the test_container are optional parameters. However the test_container parameter requires a test_suite parameter. The extra_options parameter is optional and injected as is in the command line execution.

If the function is used more than once in a job, it is up to the caller to ensure no previous test execution results remain before executing a new test.

It is also up to the caller to attach the relevant reports so that publishers can do their job too, by using the actions/get-files@v1 function or some other means.

Before launching tests in the execution environment, the function will check three conditions and return a specific error code if one is not properly fulfilled:

  • definition of SQUASH_MSBUILD_PATH environment variable (Return Code 91).
  • existence of MSBuild.exe file in the SQUASH_MSBUILD_PATH folder (Return Code 92).
  • existence of executable test file generated with MSBuild.exe (Return Code 93).

Example

- uses: ranorex/ranorex@v1
  with:
    solution: my\ranorex\solution
    solution_file: solution.sln
    project: name
    test_suite: name
    test_container: name
    global_params:
      name1: value1
      name2: value2
    test_container_params:
      name1: value1
      name2: value2
    extra_options: value

Inputs

The function has the following inputs:

  • solution (required)

    The path to the solution to execute.

  • solution_file (required)

    The name of the solution's .sln file.

  • project (required)

    The name of the project to execute.

  • test_suite (optional)

    The name of the test suite to execute, without its .rxtst extension (/ts:YourTestSuite.rxtst option).

  • test_container (optional)

    The name of the test container to execute (/tc:YourTestContainer option).

  • global_params (optional)

    Parameters to be passed as global parameters to the executed project (/pa:YourGlobalKey=YourGlobalValue option for each parameter you filled).

  • test_container_params (optional)

    Parameters to be passed to the executed test container, if a test container has been specified. Will be ignored if no test_container param is provided (/tcpa:YourTestContainer:YourContainerKey=YourContainerValue option for each parameter you filled).

  • extra_options (optional)

    Extra parameters to be passed to the executed project (free form).

    For a list of available parameters, see the Ranorex documentation.

Reports

The function generates the following reports:
(* is a wildcard matching any character string.)

  • *ranorex-report.rxlog.data

    Surefire (XML).

  • *ranorex-report.rxzlog

    TAR archive.

    Contains the *.rxlog.data XML report file and all external files referenced by the report file.

ranorex/execute@v1

An 'execute' function for use by generators.

execute function has a mandatory test input.

The first three arguments (separated by #) in the test input are mandatory, the last one is optional.

Like the ranorex function, before launching tests in the execution environment, the function will check three conditions and return a specific error code if one is not properly fulfilled:

  • definition of SQUASH_MSBUILD_PATH environment variable (Return Code 91).
  • existence of MSBuild.exe file in the SQUASH_MSBUILD_PATH folder (Return Code 92).
  • existence of executable test file generated with MSBuild.exe (Return Code 93).

Example

- uses: ranorex/execute@v1
      with:
        test: my/ranorex/solution/solution.sln#project#testSuite#testContainer

Inputs

The function has the following inputs:

  • test (required)

    The path to the project's .sln file, followed by the project name, then the test suite name, then the test container name. All parts must be separated by '#'.

Reports

The function generates the following reports:
(* is a wildcard matching any character string.)

  • *ranorex-report.rxlog.data

    Surefire (XML).

  • *ranorex-report.rxzlog

    TAR archive.

    Contains the *.rxlog.data XML report file and all external files referenced by the report file.

ranorex/params@v1

A 'params' function for use by generators.

params function has mandatory data and format inputs.

Example

- uses: ranorex/params@v1
  with:
    data:
      global:
        key1: value1
        key2: value2
      test:
        key1: value3
        key3: value4
    format: format

format must so far be SQUASHTM_FORMAT (tm.squashtest.org/params@v1).

data can have two keys:

  • global for defining global parameters.
  • test for defining test parameters.

Inputs

The function has the following inputs:

  • data (required)

    The data to use for the automated test.

  • format (required)

    The format to use for the automated test data.

actions/prepare-inception@v1

Preload the inception environment with data.

prepare-inception function has a mandatory input per file it prepares.

In the case of Ranorex:

Example

- uses: actions/prepare-inception@v1
  with:
    ranorex-report.rxlog.data: ${{ resources.files.xml }}
    ranorex-report.rxzlog: ${{ resources.files.tar }}

Inputs

The function has the following inputs:

  • ranorex-report.rxlog.data (required)

    Surefire (XML), this report is the one used to determinate the test status (success/failure).

  • ranorex-report.rxzlog (optional)

    TAR archive.