Spring Integration Testing With Maven & Spock

​It is not easy to write good automated tests as it involves to create and maintain a stable testing environment and configure the right tools. In this free less extracted from his “Test With Spring” course, Petri Kainulainen explains how to run integration tests With Maven, Spock edition.

The lesson starts with remembering the requirements for ther Maven build and explaining how to create the Maven profiles needed for this tutorial. Then it describes how to configure the source directories of the unit and integration tests. The tutorial explains how to write a simple integration test and to run it with Maven.

According to Petri Kainulainen, what you learn in this lesson is that

  • We have to configure the source directories of our unit and integration tests by changing the configuration of the GMavenPlus plugin.
  • We have to configure the resource directory of our integration tests by using the Build Helper Maven plugin.
  • We can run our integration tests by using the Maven Failsafe plugin.
  • We can skip unit and integration tests by setting the value of the skipTests property of the Maven Surefire and Maven Failsafe plugins to true.

Read the full article on https://www.testwithspring.com/lesson/running-integration-tests-with-maven-spock-edition/

1 Comment on Spring Integration Testing With Maven & Spock

  1. Great post. Automated tests are great for ensuring the smooth running of operations on devices. They offer great return on investment because of the huge workload they can handle. The tests can run 24/7 without any human support. Once written, the test scripts can be reused multiple times. Automated testing is more reliable and way quicker than usual standard tests. And, the tests can be simultaneously run on several devices. Detailed reports with the same parameters can be generated in much less time, since the same scripts were run.

Comments are closed.