Jenkins Kata 3: Automated Testing

Learn how to make a step, make the test fail, and fix the code.

Test automation is a critically important function of CI.

Many of the common failures encountered during software development can be prevented through automated testing. Automated tests can, for example:

  • Validate the output of isolated system components
  • Inspect code for common security vulnerabilities
  • Test the runtime behavior of an application

This kata will demonstrate how to add a simple test to a Jenkins job.

Step 1: Add a build step to run the test

The following are the steps to add a build to run the test:

  • Click “Configure.”
  • Click the “Build Steps” tab.
  • Click “Add build step.”
  • Select “Execute shell.”
  • Enter the following command:

Get hands-on with 1200+ tech skills courses.