CI/CD Pipeline
Running your tests in CloudBeat from CI/CD pipeline
You can trigger and run your tests in CloudBeat from CI pipeline. CloudBeat takes the hassle of parallelizing and scaling your tests in the CI pipeline, grouping test results and providing standard integration with your CI tool based on JUnit XML format. Beyond the standard JUnit XML based reporting, you can benefit from AI-driven root-cause analysis and quality gating inside CloudBeat UI.
How it works
Install the CloudBeat CLI in the pipeline (
npm install -g @cloudbeat/cli, Node.js 18 or newer).Provide your CloudBeat API key through the pipeline's secret store, as the
CB_API_KEYenvironment variable. For a self-hosted CloudBeat installation, also setCB_API_URL.Run the test case or suite with
cloudbeat-cli start. The command waits for the run to finish, writes a JUnit XML report to the working directory, and exits with code 1 when the run fails, so the pipeline step fails with it.Publish the JUnit XML report with your CI tool's test results step.
npm install -g @cloudbeat/cli
cloudbeat-cli start suite 34984 --env Staging --release "$BUILD_VERSION"Step by step guides: Jenkins and Azure DevOps. The full list of arguments and options is in the CLI reference: Running Tests.
Delivering code from the pipeline
Projects which are synchronized with Git pick up new code from the repository. For projects whose code is uploaded - for example .NET test projects, which CloudBeat runs as compiled binaries - the pipeline can upload the latest build before running the tests:
dotnet build -c Release
cloudbeat-cli project sync "Bank UI" --dir bin/Release/net8.0 --all --waitLast updated
Was this helpful?