How to execute groups of similar name for multiple classes?

0 votes
How can I run the test cases grouped as one in different class? I am not understanding as how that can be achieved?

Can someone help?
Dec 27, 2018 in Selenium by Sradha
• 1,750 points
108 views

1 answer to this question.

0 votes

Hello @Sradha, 

You can create a TestNG suite to do that. This is also done in a similar way as used to run multiple class. All you need to do is create a XML file and then mention all the classes that you want to run, mention the group that you want to test. That's all. Here is an example for the same:-

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

<suite name = "TestNG">

    <test name = "Testing TestNG">

    <groups>

        <run>

        <include name = "A"/>

        <include name = "C"/>

        </run>

    </groups>

    <classes>

        <class name = "testNG.Test1"/>

        <class name = "testNG.Test2"/>

        <class name = "testNG.Test3"/>

    </classes>

    </test>

</suite>

Hope this helps.

answered Dec 27, 2018 by Trisha

Related Questions In Selenium

0 votes
1 answer

How to print text from a list of all web elements with same class name in Selenium?

@Rajni, following test case is somewhat similar ...READ MORE

answered Jun 20, 2019 in Selenium by Avantika
20,808 views
0 votes
1 answer
+1 vote
1 answer

How to get the following-sibling element for a table type of structure

Why do you want to use the ...READ MORE

answered Apr 9 in Selenium by Karan
• 19,080 points
492 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,520 points
3,829 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,811 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,774 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,151 views
0 votes
1 answer
0 votes
1 answer