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,710 points
36 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
0 votes
1 answer
0 votes
1 answer

How do I set the zoom level of Internet Explorer to 100% when using python _winreg

My qustion is, by default for testing ...READ MORE

answered Mar 30, 2018 in Selenium by nsv999
• 5,050 points
665 views
0 votes
1 answer
0 votes
1 answer

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,050 points
256 views
0 votes
1 answer
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,130 points
621 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
249 views
0 votes
1 answer
0 votes
1 answer