Run an automation test using BuildKite

Learn how to run an automation test using BuildKite.

Before you start

You’ll need to complete the following:

Get your credentials

Some credentials can be added while you’re modifying your pipeline.yml file, but others are easier to get beforehand. Save these credentials to a secure location so you can easily add them to your pipeline.yml later:

  • Kobiton API key: get API key values from your list of Kobiton API keys.

  • Executor server credentials: N/A

  • Cloud repository credentials: get the URL and SSH key for the project you uploaded.

Modify your pipeline.yml file

Open BuildKite and select your pipeline.

Open BuildKite and select Pipelines

Select Settings.

Select Settings after selecting Pipelines

Select Steps.

Select Steps on Buildkite

Add the following steps to your pipeline.yml file:

  - label: 'Kobiton Execute Test'
      - kobiton/kobiton-execute-test#v1.0.0:
          kobi-username: '<your-username>'                     // Required: your Kobiton username.
          kobi-api-key: '<your-api-key>'                       // Required: your Kobiton API key.
          executor-url: ''    // Required:
          executor-username: '<your-executor-server-username>' // Required:
          executor-password: '<your-executor-server-password>' // Required:
          git-repo-url: '<repo-url>'                           // Required: the URL to your project's cloud repository.
          git-repo-branch: '<repo-branch>'                     // Required: the default branch for your project's cloud repository.
          git-repo-ssh-key: '<repo-ssh-key>'                   // Required: the SSH key for your project's cloud repository.
          root-directory: '<path-to-project-root>'             // Required: the relative path to your project's root directory, such as '/'.
          command: '<command-to-execute>'                      // Required: the command(s) used to install your project dependncies and run your test scripts.
          app-id: '<kobiton-app-id>'                           // When testing your app (rather than your website), assign the app's existing Kobiton ID.
          use-custom-device: '<true-or-false>'                 // Set to 'true' if you'd like to test a specific device.
          device-name: '<device-name>'                         // If 'use-custom-device' is set to 'true', set to the device's name.
          device-platform-version: '<device-platform-version>' // If 'use-custom-device' is set to 'true', set to the device's platform version.
          device-platform: '<device-platform>'                 // If 'use-custom-device' is set to 'true', set to the
          wait-for-execution: '<true-or-false>'                // Set to 'true' if you want the pipeline to wait until the test is complete.
          log-type: 'log-type'                                 // Set to 'combined' for chonological logs, 'output' for output logs, 'error' for error logs.

When you’re finished, select Save and Build.

Select Save and Build after finishing those steps

Choose to add a commit message or leave it blank, then select Create Build.

Select Create Build

When your build is complete, BuildKite will let you know if it passed.

When the build is completed