Travis CI


CloudQA test cases can be run inside your Travis CI builds. Below we've provided the example of a simple setup that triggers a suite of test cases.

  1. How to work with TravisCI

  2. How to get the inputs for TravisCI Badge


1. TravisCI
  • Consider a simple Travis CI configuration example, we'll be triggering a CloudQA test suite (with default settings) using the shell script, after the build is complete.

  • Add the snippet below to the .travis.yml file in your repository.

  • In the example below, you will need to swap in your own values for API key, Test Suite ID, Variables, Browser and Tag.

env:
     - CLOUDQA_API_KEY="<API Key>" CLOUDQA_SUITE_ID=<Test Suite ID> CLOUDQA_BROWSER=Chrome CLOUDQA_VARIABLES="var1=val1,var2=val2" CLOUDQA_BUILD_TAG=<BUILD ID> CLOUDQA_BASE_URL="Application Base URL"

language: bash

before_script:
    - curl -0 https://doc.cloudqa.io/files/cloudqa-travisci.sh

script: 
    - bash cloudqa-travisci.sh

NOTE:

  • If using tag, also supply the variables(either actual or dummy variables)

Status

  • Check your job log in order to verify the status of test suite every 10 seconds.

Local Image


2. TravisCI Badge

Follow below steps to get the inputs for creating a badge in Travis CI

  • Get the status Image URL - Go to TruRT >> Under actions select more options button >> select Status Image. The status image URL will be shown in the green color msg box

  • Get the Test suite id - Go to TruRT >> Under actions select more options button >> choose details option, you can obtain the test suite ID.

Local Image

Syntax for creating a badge in Travis CI


### Test Scheduler : [![](<<Status Image URL>>)](https://app.cloudqa.io/Recoder/TestSuitesSummary/<<test suite id>>)

Example

### Test Scheduler : [![](https://stage.cloudqa.io/Recoder/SuiteBadge/001?token=yH7Bp0v5Zg3e0uZgfFlEtAvq6iUmqcVRjvkhmpsQao0=)(https://stage.cloudqa.io/Recoder/TestSuitesSummary/001)

results matching ""

    No results matching ""