Help Needed with Dependencies in testng.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Help Needed with Dependencies in testng.xml

youralok@gmail.com
I am unable to achieve dependency in testng.xml.
I want my second test "create new survey" should be dependent on first test "login".
I tried many things, but mostly I get error 

"DependencyMap::Method "CreateNewSurvey.CreateSurvey(java.util.Hashtable)[pri:0, instance:com.surveymanager.hybrid.testcases.CreateNewSurvey@4d9f6ce5]" depends on nonexistent group "LoginGroup""

Here is my testng.xml code given below:


<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Survey Manager Survey Creation Automation">

<test name="Logging into the Account:">
  <groups>
    <run>
      <include name="LoginGroup"/>
    </run>
  </groups>
  <classes>
    <class name="com.surveymanager.hybrid.testcases.LoginToAccount"/>
  </classes>
</test>

<test name="Creating a New Survey:">
  <groups>
    <run>
      <include name="CreateSurveyGroup"/>
     </run>
    <dependencies>
      <group name="CreateSurveyGroup" depends-on="LoginGroup" />
     </dependencies>
  </groups>
  <classes>
    <class name="com.surveymanager.hybrid.testcases.CreateNewSurvey"/>
  </classes>
</test>
</suite>

Please help.

Thanks,
Alok

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/y6wnUEVsoC4J.
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.