Automation Testing with CI/CD - Puppeteer Automation Tests with Jenkins
Integrate Puppeteer Automation Tests with Jenkins
With Jenkins, First you need to do an initial set up and make sure you have Java installed for Jenkins on your PC.
Download the "Jenkins.war" file with name “Generic Java package (.war)” from https://www.jenkins.io/download/ and copy to the project root folder.
Open VS code and navigate to your project folder and copy the "jenkins.war" file into the project root folder.
Open VS code and navigate to your project folder and copy the "jenkins.war" file into the project root folder and run the command "npm run start-jenkins-server" to start Jenkins on port 9090
I open another VS Code window and run the command "npm start" to start my web application on localhost:3000
My application looks like this on Localhost:3000 below.
Note: Your Frontend and Backend App should be running
Open Jenkins http://localhost:9090/ to login with your credentials and create a Freestyle project for Puppeteer with name “Account Management Service”
Your Freestyle project configuration is like this. You can parameterize the tests with smoke and regression as shown below
Click on the option “Build with parameters” on the left side.
Select “test:smoke” and click on ‘Build’ button below to run Smoke Tests – Total 17 test cases Identified
Select “test:Regression” and click on ‘Build’ button below to run Regression Tests – Total 42 test cases Identified
Now, select “test” and click on ‘Build’ button below to run all the Tests – Smoke 17 tests + Regression 42 tests which equals to Total 59 test cases all together
Puppeteer GitHub Repo: Puppeteer-Repo
Happy Automation Testing Guys :) !
Comments
Post a Comment