0

I am using TestNG and maven failsafe for my integration tests.

The tests are executed and they pass however there are absolutely no details printed out.

I even created a dummy test and have System.out.println in that and none of that is printed out.

<plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
                <execution>
                    <id>integration-tests</id>
                    <phase>integration-test</phase>
                    <goals>
                        <goal>integration-test</goal>
                    </goals>
                    <configuration>

                        <excludes>
                            <exclude>none</exclude>
                        </excludes>

                        <includes>
                            <include>**/*IntegrationTest.java</include>
                        </includes>

                        <properties>
                            <property>
                                <name>surefire.testng.verbose</name>
                                <value>10</value>
                            </property>
                        </properties>                           

                    </configuration>
                </execution>
                <execution>
                    <id>verify</id>
                    <goals>
                        <goal>verify</goal>
                    </goals>
                    <configuration>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <skip>false</skip>
                        <excludes>
                            <exclude>none</exclude>
                        </excludes>
                        <includes>
                            <include>**/*IntegrationTest.java</include>
                        </includes>
                    </configuration>
                </execution>
            </executions>
        </plugin>

I want the testNG summary to be printed and logging statements to be printed ...

I am also using the groovy-eclipse-compiler plugin .. not sure if that makes a difference though

tim_yates
  • 167,322
  • 27
  • 342
  • 338
SK176H
  • 1,319
  • 3
  • 14
  • 25

1 Answers1

-1

When you use a testing framework, you need to use the maven surefire plugin to have a summary of your results. I dont think that anything is executed the way you do it right now, so no output is expectable.

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>${basedir}/src/main/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <skipTests>${skipTests}</skipTests>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>
Henning Luther
  • 2,067
  • 15
  • 22
  • surefire is for unit testing. I am doing integration tests. The tests are being executed and are passing. I can see it in the report. The question is on the output of the tests. There is a whole page on running testng with failsafe if you google it – SK176H Aug 08 '16 at 19:49
  • http://stackoverflow.com/questions/28986005/what-is-the-difference-between-maven-sure-fire-and-maven-fail-safe-plugin – SK176H Aug 08 '16 at 19:55
  • so it does the same as this little xml configuration i posted, except there is no summary :fail-safe - true – Henning Luther Aug 09 '16 at 06:16