I have a Maven project that I've converted to 5.4 and I decided to write
some new Geb test cases for it. Seems simple enough but they did not run at
all. Apparently Maven only runs classes ending in Test and mine were Spec.
After fixing that they ran fine but reported 0 tests run. After some
digging around I discovered Maven prefers TestNG over JUnit and the Geb
tests are JUnit. The only way I could get them to work was to exclude the
testNG jars in my pom file. Here what I added to get things working.

<plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-surefire-plugin</artifactId>

                <version>2.9</version>

                <configuration>

                <argLine>-Xms512m -Xmx512m</argLine>

               <includes>

            <include>**/*Spec.*</include>

          </includes>

                    <systemPropertyVariables>

                        <tapestry.execution-mode>Qa</tapestry.execution-mode
>

                        <geb.build.reportsDir>target/test-reports/geb</
geb.build.reportsDir>

                        <geb.build.baseUrl>http://localhost:8080/studio</
geb.build.baseUrl>

                        <tapestry.compiled-asset-cache-dir>target/classes</
tapestry.compiled-asset-cache-dir>

                    </systemPropertyVariables>

                </configuration>

            </plugin>



             <plugin>

             <groupId>org.codehaus.gmaven</groupId>

             <artifactId>gmaven-plugin</artifactId>

             <version>1.4</version>

             <configuration>

               <providerSelection>2.0</providerSelection>

             </configuration>

             <executions>

             <execution>

             <goals>

             <goal>testCompile</goal>

             </goals>

             </execution>

             </executions>



             </plugin>

Reply via email to