Sunday, 7 February 2021

How to run test automation TestNG suite with gradle from jenkins job? Jenkins Integration with Gradle and TestNG.xml suite?Run TestNG suite with Gradle?

 

 

 

**************************************************

SeleniumWebdriver Automation Testing Interview Questions:

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 ***************************************************

STEP  - 01:

 Add test to build.gradle file and define the testng Automation suite.xml path as shown below :

// in below screenshot SmokeSuite.xml has all the test scripts to run and the path in project folder is Resources/TestSuite/SmokeSuite.xml

test {

    useTestNG() {

        useDefaultListeners = true

        suites "Resources/TestSuite/SmokeSuite.xml"

    }

 

STEP -02:

Go to the project path and open cmd, then type below command to check gradle task is executing properly:

gradlew clean test


 

 STEP - 03:

Click on new item in Jenkins



 STEP - 04:

Give project name and select freestyle project


********************************************************

Framework Design Tips & Interview Question-Click Here

**************************************************

 STEP - 05:

Go To Build ==> Invoke Gradle Script


 

STEP - 06:

Define Tasks as "clean test" and Buildfile is the path of your project build.gradle



 

STEP - 07:

Click on Build Now button in the left panel to run your suite.

 


 

 

**************************************************

SeleniumWebdriver Automation Testing Interview Questions:

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

 

No comments:

Post a Comment

All Time Popular Posts

Most Featured Post

Introduction to Web Testing with Playwright

  Introduction to Web Testing with Playwright 📌  Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 📌  YouTube channel:  https://lnkd.in/gGUG...