chapter thirteen

13 Continuous integration with JUnit 5

 

This chapter covers

  • Introducing continuous integration
  • Customizing and configuring Jenkins
  • Practicing continuous integration in a team of developers
  • Working on tasks in a continuous integration environment

— Michael J. Gelb

We have implemented, in chapters 10 and 11, ways to automatically execute the tests by using tools such as Maven and Gradle. Our tests were then triggered by the build. Now, it is time to go to the next level – automatically executing the build and the tests on a regular interval of time by using some other popular tools. In this chapter, we will get to know the paradigm of continuous integration and will demonstrate how to schedule your project to be built automatically in a certain period of time.

13.1   Continuous integration testing

Integration tests are usually time-consuming and, as a single developer, you may not have all the different modules built on your machine. Therefore, it makes no sense to run all the integration tests during development time. That is because, at development time, we are only focused on our module and all we want to know is that it works as a single unit. During development time, we care mostly that, providing the right input data, the module behaves as expected and produces the expected result.

Integrating the execution of JUnit tests as part of your development cycle -

[code : run : test : code ]

or

13.2   Introducing Jenkins

13.3   Jenkins customization

13.4   Practicing continuous integration in a team

13.5   Configuring Jenkins

13.6   Working on tasks in a continuous integration environment

13.7   Summary