Chapter 7. Testing and Reporting with Gradle
In this chapter, we will cover four different topics: testing with TestNG, integration testing, code coverage with JaCoCo, and code analysis with Sonar. In Chapter 2, Building Java Projects, we already discussed unit testing with JUnit. In this chapter, we'll cover another widely used testing tool, TestNG. Code coverage and code quality are the other two important aspects in test-driven development (TDD). In today's agile development process, developers need continuous feedback on the code developed by them. Code quality tools help us to achieve this goal. Often, these tools are integrated with the Continuous Integration (CI) systems so that these reports are created on a daily basis (may be even after each commit), shared among different teams, and even be persisted for future analysis. In this chapter, we will be focusing only on the Gradle aspects of different tools. We will mainly cover different Gradle plugins that support...