dependsOnGroups Scope!?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

dependsOnGroups Scope!?

Bobby Bosch

Running TestNG through Eclipse

So here is my XML File:
<suite name="ACS 5.0 Automation" verbose="1">
        <test name="Installation">
                <classes>
                        <class name="com.cisco.acs5.test.installation.SetupACS" />
                </classes>
        </test>
        <test name="Smoke">
                <classes>
                        <class name="com.cisco.acs5.test.smoke.SmokeTest" />
                </classes>
        </test>
</suite>

so my SetupACS class has the definition
@Test (groups="setupacs")
public class SetupACS{}

and my SmokeTest class has the definition
@Test (dependsOnGroups="setupacs")
public class SmokeTest{}

but every time i run the SetupACS passes and the SmokeTest gets
skipped... is there any reason why this is happening?

Thanks!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: dependsOnGroups Scope!?

Alexandru Popescu ☀

On 1/13/07, boschb <[hidden email]> wrote:

>
> Running TestNG through Eclipse
>
> So here is my XML File:
> <suite name="ACS 5.0 Automation" verbose="1">
>         <test name="Installation">
>                 <classes>
>                         <class name="com.cisco.acs5.test.installation.SetupACS" />
>                 </classes>
>         </test>
>         <test name="Smoke">
>                 <classes>
>                         <class name="com.cisco.acs5.test.smoke.SmokeTest" />
>                 </classes>
>         </test>
> </suite>
>
> so my SetupACS class has the definition
> @Test (groups="setupacs")
> public class SetupACS{}
>
> and my SmokeTest class has the definition
> @Test (dependsOnGroups="setupacs")
> public class SmokeTest{}
>
> but every time i run the SetupACS passes and the SmokeTest gets
> skipped... is there any reason why this is happening?
>
> Thanks!
>

Tests (as in <test>s) are independent units, so your dependencies
cannot cross their borders. Placing your both classes in the same test
will make it works as expected.

HTH,

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---