Previous class runs over again when we run testcases using testng

123 views Asked by At

I have 2 class which I'm running through TestNG, class A has 2 methods and class B has one method but when I run the suite of class A and B through TestNG, It runs like, class A method 1 & 2 will run and with class B it's method runs and method of class A also runs again y?

1

There are 1 answers

0
Priyanka On

Check your tag in testNG.xml file, it should be like:

<classes>
     <class name="A"/>
     <class name="B"/>
</classes>

You can post you testNG.xml file code as it will be easy to identify the issue.