An important part of developing software is writing tests for our code. In this chapter, we will discuss how to run our test code as part of the build process. Gradle supports both JUnit and TestNG testing frameworks. We can even run tests simultaneously to shorten the time of the build, resulting in quick builds.
We will also discuss how to run a Java application as part of a Gradle build. We can use the application plugin to automatically execute a Java application as part of the build.
After we have written and tested our code, it is time to publish the code so that others can use it. We will build a package and deploy our code to a company repository or any other repository.