Help Needed with Dependencies in testng.xml

26 views
Skip to first unread message

Kumar

unread,
Dec 20, 2012, 3:57:05 AM12/20/12
to testng...@googlegroups.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
Reply all
Reply to author
Forward
0 new messages