click here to go back to the main README.
Now that our code compiles we would like to run some tests. For Maven we can request to perform a standard set of Unit tests. Other languages might have a different implementation
Go back to your Jenkins Dashboard if not already there.
Go to "New item".
Enter “Test” as the item name and choose "Freestyle project"
Go to tab Source Code Managemet
Enter https://github.com/__username__/bootcamp-jenkins-example.git in the field "Repository URL".
Make sure you use your own username
Go to "Build" and select "ADD BUILD STEP". Choose "Invoke top-level Maven targets".
Select "M3" in the "Maven Version" dropdown menu.
Enter "clean test" in the "Goals" field.\
Click on "Save"
Now we are going to execute the unit test. Click "Build Now" to start the job.
Take a look at the outcome.
Go to the console output and take a look at the error
Fix the java code until the job completes
Note: In order for jenkins to register your new code you need to edit the file locally, commit the changes and push them to your repository. Ask help from one of the instructors if you need If you can't wait for help or can't figure out what went wrong you can follow the alternative Path
Alternatively you can change the branch in the job to one where we fixed the code for you
Go to Source Code Management.
in the "Source Code management" tab to "*/step3".
Re-run the job and take a look at the outcome.
click here to go back to the main README.