I'm having a frustrating test dependency issue and I don't know if it is my
configuration or a problem.  I've got two test classes in my maven project
using testng:6.8.7 and maven-surefire-plugin:2.16.

The first test class has the following annotation on the test *class* which
should be inherited by the test methods:

*     @Test(groups={ "functional" })*
*      public class FuncTest{...}*

on the other test *class*, I have:

*     @Test(groups={ "load" }, dependsOnGroups = { "functional" })*
*      public class LoadTest {...}*

When I run the following:

     *mvn test*

I get the error:

     *[ERROR] DependencyMap::Method LoadTest depends on nonexistent group
"functional"*

If I REMOVE the "dependsOnGroups..." it works.  If I do any of the
following but keep the "dependsOnGroups" option:

    * mvn test -Dtest=LoadTest,FuncTest*
    * mvn test -Dgroups=functional,load*
    * mvn test -Dgroups=functional,load **-Dtest=LoadTest,FuncTest*

it fails with the error above.  If I run it outside of Maven by calling
org.testng.TestNG directly, it works fine.

I also tried moving the group definitions/dependencies to the test method
directly, but that didn't change.

*What am I missing?  *

Thanks!

-- 
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent

Reply via email to