As you may already know, Jenkins is an open source automation server which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software. It is a very popular tool used for CI/CD Pipeline and Build automation.
Testsigma provides a Jenkins plugin to automate Test Execution in your Jenkins Pipeline.
TABLE OF CONTENTS
- Steps to add the execution step in Jenkins pipeline
Testsigma Test Plan Run - 1.1 - Jenkins Plugin
You can install Testsigma Test Plan run plugin installed from Jenkins Plugins page in your Jenkins Installation. You can also get it from here and place in your JENKINS_HOME/plugins directory - Testsigma Jenkins Plugin direct link
Steps to add the execution step in Jenkins pipeline
If you have a Jenkins pipeline built already, skip to step 5. Else, follow the below steps to create a new Pipeline. Log into your Jenkins Instance after starting the Jenkins instance. It takes you to the Jenkins Dashboard as shown below:
Step 1. Create a new pipeline
Create a new pipeline by clicking on 'New Item' on the left menu in Dashboard page above. Enter a name, select 'Freestyle Project' as the Project type and click on 'Ok' button to create the Pipeline.
Step 2: Add Build Stage
Click on 'Build' tab and then click on 'Add Build Step' to add your Build Stage using any of the available plugins such as Ant, Gradle, Shell script e.t.c
We would suggest you to get help from your Ops team in configuring the Build Pipeline if you are trying for the first time.
Step 3: Add Test Stage using Testsigma Test Plan Run plugin
1. Click on 'Add build step' to create a new Stage for Testsigma Test Plan Trigger and click on 'Testsigma Test Plan run' to create a new Stage using the installed Testsigma plugin (If you have not installed it yet, check the Prerequisites section)
2. Enter the following details:
Testsigma API Key: Generated from Configurations > API Keys in Testsigma App
Testsigma Test Plan ID: You can get the Test Plan specific ID from the Test Plan details page(Test Plans> Click on Test Plan name > CI/CD Integration Tab)
Maximum wait time for Task completion: Specify the maximum time in minutes you want the Testsigma Plugin to wait before timing out. After this timeout, The execution will still continue in Testsigma and you can go to Testsigma to check the Test Plan status later.
Report File Path: The File path where the JUnit report XML file is stored
Here's a sample entry:
3. Click on 'Save' to save the changes.
Step 4: Try a Sample Build
1. click on Build now to trigger the Pipeline manually to check.
2. Click on the Build number and then click on Console log to see the Logs for the execution. If everything went as expected, you would see a similar log.
You can log into Testsigma to learn more about the results. That's all we need to automate Test Execution when a successful build is triggered using the Jenkins CI server.
Welcome to the era of Smart Test Automation!