concept integration test in category gradle

appears as: integration tests, integration test, n integration test, The integration test, integration test, integration tests
Gradle in Action - corrected 9052019

This is an excerpt from Manning's book Gradle in Action - corrected 9052019.

  • My IDE does the job. At Acme, developers do all their coding within the IDE, from navigating through the source code, implementing new features, and compiling and refactoring code, to running unit and integration tests. Whenever new code is developed, they press the Compile button. If the IDE tells them that there’s no compilation error and the tests are passing, they check the code into version control so it can be shared with the rest of the team. The IDE is a powerful tool, but every developer will need to install it first with a standardized version to be able to perform all of these tasks, a lesson Joe learns when he uses a new feature only supported by the latest version of the compiler.
  • Integration testing is used to test an entire component or subsystem. You want to make sure that the interaction between multiple classes works as expected. A typical scenario for an integration test is to verify the interaction between production code and the database. As a result, dependent subsystems, resources, and services have to be accessible during test execution. Integration tests usually take longer to execute than unit tests and are harder to maintain, and the cause of a failure may be harder to diagnose.
  • Defining a source set for integration tests

    Source code in every source set definition needs to be compiled and copied to the correct directory before it can be executed. That’s also true for integration tests. Remember the days when you had to implement a similar requirement with Ant? You’d have to write code similar to what you would write for compiling and executing your unit tests. How did you solve this? Usually by copying and pasting the code and modifying the targeting directories, a generally bad practice. Advanced Ant users would consider writing a custom task.

    Listing 7.17. Defining a source set for integration tests