Jenkins

Parameterization

  • Go to configure page of your current build.

  • In General Tab , tick 'This project is parametrized'.

  • Fill in the name of the key, and value - shown example usage of CloudBeat's user API-Key:

Name is the key , and default value is the API key.

NOTE: API key is received from the General settings (click here for more information).

Build commands

Execution:

An example to the CloudBeat-CLI execution command looks like this:

cloudbeat-cli --method=start_test --id=241 --apiKey=$_key --host=https://app.cloudbeat.io

The following command contains 4 main things:

  1. Method - in this case we want to start a test so the method is 'start_test'

  2. ID - in the following example - our test suite ID is '241'.

  3. API key.

  4. Host.

Another example:

Click to view the build command

Getting test status:

Used for getting status of an already running test:

cloudbeat-cli --method=get_run_status --id=[id] --apiKey=[apiKey] --host=https://api.cloudbeat.io

Uploading ZIP archives:

Used for updating a cloudbeat project :

cloudbeat-cli --method=pack_and_send --id=[id] --apiKey=[apiKey] --folder=C:\testResults --host=https://api.cloudbeat.io

Additional parameters:

Exit code can be controlled with --fail-on-errors (true or false). Default is true. For example --fail-on-errors=true

You can see full error using debug mode --debug (true or false). Default is false. For example --debug=true

Reporting & Formatting

In order to get a detailed report we shall use a JUnit XML report , see the following example: