java - Unable to run the Regression group in testng.xml file for different browsers -
i have configured testng.xml file run regression group in different browsers.below testng.xml code same.
<?xml version="1.0" encoding="utf-8"?> <!doctype suite system "http://testng.org/testng-1.0.dtd"> <suite name="seleniumsuite" verbose ="1" thread-count = "1" parallel="false"> <**test** name="firefoxtest"> <groups> <run> <include name="regression"></include> </run> </groups> <parameter name="browser" value="firefox" /> <classes> <class name="testscript.program111_redifflogin" /> </classes> </test> <test name="ietest"> <groups> <run> <include name="regression"></include> </run> </groups> <parameter name="browser" value="ie" /> <classes> <class name="testscript.program111_redifflogin" /> </classes> </test> </suite>
when hover mouse on tag, displays error message "the content of element type "test" must match "(method-selectors?,parameter*,groups?,packages?,classes?)".at test class level have defined parameters regression test run.but still seeing error in testng.xml file.can 1 of , me!
please find test case using automation
@test(groups={"regression"},dataprovider = "hashmapdataprovider",dataproviderclass =dataprovider.dataprovider_hashmap.class,priority=1 ) public void validlogin(map<string,string> hm) throws ioexception { pageobjects.signin(); driver.manage().timeouts().implicitlywait(15, timeunit.seconds); originalexcelrw excel = new originalexcelrw("f:\\anand_acer\\selenium\\rediffbooks.xlsx"); xssfsheet s1 = excel.setsheet("sheet1"); softassert s_assert = new softassert(); if (hm.get("executionflow").contains("anand")) { pageobjects.username1(hm.get(excel.readvalue(s1, 0, 2))); pageobjects.pass1(hm.get(excel.readvalue(s1, 0, 3))); //s_assert.assertequals(hm.get(excel.readvalue(s1, 0, 2)), hm.get(excel.readvalue(s1, 0, 3)), "both usssser ideee , password doesnt matches"); //logger.info("usssser ideeee"); pageobjects.login(); s_assert.asserttrue(true, "login success"); //logger.info("the login success"); system.out.println("valid login passed"); pageobjects.signout(); pageobjects.signin(); //pageobjects.cleartext(); } s_assert.assertall(); }
looks error message have posted must in special order of indentation?
here example of xml works
<!doctype suite system "http://testng.org/testng-1.0.dtd" > <suite verbose="1" name="example suite 1"> <listeners> <listener class-name="reportlistener.reportlistenerclass" /> </listeners> <test name="logout tests"> <classes> <class name="com.emc.qe.u360.tests.logouttests" /> </classes> </test> <test name="login tests"> <classes> <class name="com.emc.qe.u360.tests.loginpagetests" /> </classes> </test> </suite>
Comments
Post a Comment