Jenkins Pipeline
If you are running using Jenkins, you might have to export few variables first because they vary based on which type of pipeline and which plugin you are using.
Pre-requisites:
Complete integration of your SCM with HyperTest. Refer individual guides for Github, Gitlab and Bitbucket Intergration for the same.
Trigger your pipeline on every PR event
Build and deploy your test application
Download Hypertest CLI
Start a new test run from CLI
The above flow will ensure that every time a new PR is raised, tests are automatically triggred in HyperTest.
Set Variables:
Although, we automatically pick these variables, but if they are not picked up, you can manually set them before starting a test run
Depending on from where Jenkins is picking up code and what plugin and type of pipeline you are using Jenkins might be using different variable to store these values.
Below we have list of variables where Jenkins mainly expose it
Branch name: GIT_BRANCH/ BRANCH_NAME/ CHANGE_BRANCH
Last commit: GIT_COMMIT
PR number: CHANGE_ID/ ghprbPullId
Sample files for CI/CD
A sample CI file for Jenkins is available below:
Getting Started:
1. Download HyperTest CLI
2. Check if HyperTest can start a test
3. Start new test run
Last updated