2
votes

I am learning TestNG and working on parameterization. I created a new java class and then I created a new testng.xml file. I included the class name in the xml file. But I tried to run the testNG.xml file as TestNG Suite nothing will work.

Please see to the java class,

 public class Test1 {

 @Test
 public void test_Firefox()
 {
    System.out.println("Test_Firefox method..");
 }
}

Testng.xml file,

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="Suite1" verbose="1" >
 <test name="Test" >
   <classes>
      <class name="com.multibrowser.Test1" />
   </classes>
 </test>
</suite>

Folder structure, enter image description here

Please help me in this.

1
did you get this working ?vikramvi

1 Answers

3
votes

Not sure Why did you created your suite file under "Referenced Libraries"

create it under "com.multibrowser" package. or under another folder.

take a look at screenshot below, testng-suite.xml.

enter image description here


Right click your suite file, click Run as -> Run Configurations. you will some thing like below,

enter image description here

Right Click testng and give new, Then choose your suite and give run, as per screenshot. enter image description here