Friday, September 20, 2019

Post#96.Creating and executing Jenkins Job


Creating new jobs




Step#1 Once you reached the above page, Click on the New Item link to create a CI job.


Step#2 Enter the Item name. (I have entered Mercury) Select the Freestyle project. Click on OK button.

Step#3. Below screen will appear after above actions.

Step#4. Click on 'Advanced…' button. Select 'Use custom workspace' checkbox. Enter your project directory path.

Step#5. Navigate to Build tab. Select Execute Windows batch command from Add build step dropdown.

Step#6. Enter the below command.  (We are using Maven Project). Click on Apply and then Save.

mvn test


Step#7. You have created your job successfully.


Step#8. Click the Build Now link to run our project in Jenkins.

Once you click on Build Now link, you will see below option under Build History.

This means the given maven command is executing your test cases.

Once the execution is done click the build number to see the details, and select Console Output option.


Under Console output page you will get below message if your build execution is successful.







No comments:

Post a Comment