> For the complete documentation index, see [llms.txt](https://docs.cloudbeat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudbeat.io/features/integrations/ci-cd-tools/jenkins.md).

# Jenkins

You can easily trigger and run tests in CloudBeat inside your Jenkins pipeline using the guide below.&#x20;

CloudBeat takes the hassle of parallelizing and scaling your tests in Jenkins, grouping test results and allowing to see the test reports inside Jenkins.

### Adding CloudBeat's API Key in project parameters

We recommend to use Project Parameters to store CloudBeat's API Key. This will allow to centrally managed CloudBeat related credentials and share the API Key between multiple CloudBeat CLI invocations.

To add CloudBeat's API Key as project parameter, complete the following steps:

* 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. Below is an example of specifying CloudBeat's user API Key:

![Name is the key , and default value is the API key.](/files/-LumMWwIU9SXOLE8ZOEM)

{% hint style="info" %}
**NOTE:** API Key can be found in My Settings -> Security screen. See [General Settings for more details.](/settings-and-administration/managing-my-profile.md#general-settings)
{% endhint %}

### Running your tests as part of the Build

In order to trigger your tests from Jenkins, you will need to use CloudBeat CLI. You need to add the below steps right at the point where you want your tests to be executed.

Go to your Jenkins build and add **two** *Execute Shell* build steps:

<figure><img src="/files/WW9iE0X5JV9fGzwt1t08" alt=""><figcaption></figcaption></figure>

Add the following Command in the **first** added step in order to install CloudBeat CLI as NPM module (Node.js installation is require prior to this step execution):

```
npm install @cloudbeat/cli -g
```

In the **second** added step, enter CloudBeat CLI `start` command with related arguments. Here is an example of CloudBeat CLI command that runs a specified test case:

```
cloudbeat-cli start case 70224 --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE
```

{% hint style="warning" %}
Node.js 16 or above must be installed in your Jenkins or Docker environment before running *npm install* command.
{% endhint %}

{% hint style="info" %}
You can find more details on various CloudBeat CLI commands and argument [here](/features/integrations/ci-cd-tools.md).&#x20;
{% endhint %}

### **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`

### Test result reporting

In order to get a test report in Jenkins when the test run is finished, you need to add the following post-build action:

![CloudBeat CLI will generate JUnit XML based result file which will be processed by this post-build action.](/files/-LumTx7k8nWdw51pXCZ3)

You can also see the full test report inside CloudBeat UI, which will include test summary insights, detailed execution steps, performance metrics, various logs and AI-driven failure root-cause analysis.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cloudbeat.io/features/integrations/ci-cd-tools/jenkins.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
