Skip to content

Jenkins

Jenkins is an open-source automation server for building, testing and deploying software. Add a build step to run a CloudQA suite as part of your job. See CI/CD integrations for the variables and what you need first.

  1. In your Jenkins project, add a build step named Execute Shell.
  2. Paste in the script below and fill in your API key, test suite ID, browser (Chrome or Firefox) and, optionally, variables.
Terminal window
export CLOUDQA_API_KEY="<API key>"
export CLOUDQA_SUITE_ID="<TestSuite Id>"
export CLOUDQA_BROWSER="<Browser (Chrome or Firefox)>"
export CLOUDQA_VARIABLES="var1=val1,var2=val2"
export CLOUDQA_BUILD_TAG="<BUILD ID>"
export CLOUDQA_BASE_URL="<Application Start URL>"
export CLOUDQA_SEQUENTIAL_EXECUTION="<true/false>"
curl -s https://doc.cloudqa.io/files/cloudqa-bash.sh | bash /dev/stdin
  1. Install the PowerShell plugin: go to Manage Jenkins, then Manage Plugins, and choose PowerShell Plugin.
  2. In your project, add a build step named Windows PowerShell.
  3. Paste in the script below and substitute your values.
Terminal window
Set-Variable -Name "CLOUDQA_APIKEY" -Value "<API key>"
Set-Variable -Name "CLOUDQA_SUITE_ID" -Value "<TestSuite Id>"
Set-Variable -Name "CLOUDQA_BROWSER" -Value "<Browser (Chrome or Firefox)>"
Set-Variable -Name "CLOUDQA_VARIABLES" -Value "var1=val1,var2=val2"
Set-Variable -Name "CLOUDQA_BUILD_TAG" -Value "<BUILD ID>"
Set-Variable -Name "CLOUDQA_ENVIRONMENT_NAME" -Value "<Application Environment Name>"
Set-Variable -Name "CLOUDQA_SEQUENTIAL_EXECUTION" -Value "<true/false>"
Invoke-WebRequest -Uri https://doc.cloudqa.io/files/cloudqa-jenkins.ps1 -OutFile cloudqa-jenkins.ps1
./cloudqa-jenkins.ps1
Linux Windows
API key variable CLOUDQA_API_KEY CLOUDQA_APIKEY
Where the app runs CLOUDQA_BASE_URL (application start URL) CLOUDQA_ENVIRONMENT_NAME (application environment name)
Script cloudqa-bash.sh cloudqa-jenkins.ps1