Skip to content

CI/CD Integration

This article shows how to integrate Botium into your CI/CD pipeline. One of the key principles of Botium is to prevent vendor-lock-in — it is open to the highest degree for integration into any software product out there, even custom pipelines.

As long as it supports any of the following technologies, there is a very high likelyhood that Botium will seamlessly fit into your CI/CD pipeline:

  • Running a headless CLI tool
  • Running Mocha/Jest/Jasmine tests with Node.js
  • Calling an HTTP(S)-GET-Endpoint, either by itself or by using tools like cURL or Wget

Botium can output several file formats for further processing in a CI/CD pipeline:

  • JUnit XML (test results)
  • CSV (test results and full test case transcripts)
  • JSON (test results and full test case transcripts)

Botium Box provides a flexible HTTP(S) endpoint for triggering tests and delivering the results. After you defined your test project with the Quickstart-Wizard there is a Build Server Integration screen available. It assists in composing the HTTP(S) links and command line calls to use for triggering test case execution.


Step 1/3: Enter Build Server Integration Scripts Parameters

Provide some information to Botium Box:

  • API Key: API Key to use in your requests
  • Build Id: Build Identifier to name your Test Results (in real-life projects this parameter is dynamically filled from the CI/CD pipeline of your choice)
  • Build Tags: Build Tags to attach to the Test Results
  • Output Format: File format to use for the test results
  • Callback URL: Botium Box will call this URL when test case execution is ready. This is the HTTP(S) endpoint to use for the callback
  • Callback Method: The HTTP(S) Method to use for the callback. If you select POST, then the test case result will be delivered in the request body.
  • Wait with HTTP(S) response until test session completed: When calling the Botium Box endpoint, you can select if you just want to trigger the test case execution and run it in the background, or if the HTTP(S) request should wait until the test session is completed.

The fields in the next section are automatically filled with what you selected here.

Step 2/3: Generated Build Server Integration Scripts

The HTTP(S) Webhook Link is a generic endpoint to use for triggering the test case execution. You can use any client able to do HTTP(S) requests, even your internet browser (yes, you are right: you can start test case execution from just clicking a hyperlink).

  • Start Test Project Link is the link to use
  • Status Link: Use this link to get the status and result for the Botium Test Project (Build Id required)

The other tabs show how to use Botium CLI or the command line tool cURL for doing the same.

For advanced integration, you can build your own HTTP(S) webhook link in the Build Your Own section: The endpoint to use as base is shown there, and the parameters and how to hand them over are described.

All parameters can be handed over to the webhook either:

  • As HTTP query parameter (“…&PARAMNAME=VALUE…”)
  • As JSON body part attribute (Request Body: { …”PARAMNAME”: “VALUE”…})
  • As HTTP header with prefix “X-BOTIUM-” (“X-BOTIUM-PARAMNAME”: “VALUE”)

The parameters are:

  • APIKEY: mandatory — API Key to use in your requests
  • BUILDID: optional at start, mandatory at status check — Build Identifier to name your Test Results, you can choose your own
  • TAG: optional, multiple — Build Tags to attach to the Test Results
  • REPORTER: optional — File format to use for the test results (json, junit, csv)
  • CALLBACKURL: optional — HTTP(S) endpoint to use for the callback
  • CALLBACKMETHOD: optional — HTTP(S) Method to use for the callback
  • WAIT: optional — 1 (wait until complete) or 0 (run in background)

If everything is setup correctly, the test case results will be imported by your CI/CD pipeline.

Step 3/3: Configure Your Build Server

You will find instructions how to configure your build server for some common products and architectures in the How-To-Guides