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.


language: bash

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

script: 
    - bash cloudqa-travisci.sh "<API Key>" "<Test Suite ID>" "<Browser[optional]>" "<Variables[ex: var1=val1,var2=val2, optional]>" "<Tag[ex: build ID]>"

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 ""