Jenkins Integration


Jenkins is a self-contained, open source automation server which can be used to automate all sorts of tasks related to building, testing, and deploying software.

Below is the procedure:

For Linux
  • In your Jenkins project, add a new build step Execute Shell Command.

  • Add the following script, and insert your API key, test suite Id, browser name ("Chrome", "Firefox", "IE") and optional variable name value pairs.

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

Note: Please ensure jq is installed on your build system.

For Windows
  • Install the Powershell plugin by choosing PowerShell Plugin from Manage Jenkins -> Manage Plugins.

  • In your project add a new build step Windows Powershell.

  • Add the below script, and substitute values for API Key, TestSuite Id, Browser and Variables

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

results matching ""

    No results matching ""