Automating the service layer tests

Updating the pom.xml as follows will include the service layer test cases during the Maven build process:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
    <version>2.14.1</version>
  <configuration>
    <skipTests>false</skipTests>
    <includes>
      <include>**/dao/*Test.java</include>
      <include>**/service/*Test.java</include>
    </includes>
    <argLine>-javaagent:target/lib/spring-instrument-${spring.version}.jar</argLine>
  </configuration>
</plugin>

Selecting Run | Test Project from the NetBeans menu will then execute all test cases from both the dao and service packages, resulting in the following output:

Automating the service layer tests

We leave it to you to add test cases for the remaining service layer implementations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.124.145