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
33 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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

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,030 points
517 views
0 votes
1 answer
0 votes
1 answer

How to handle the popup of file upload in Windows OS with WebDriver?

The value of name locator has probably ...READ MORE

answered Apr 25, 2018 in Selenium by king_kenny
• 3,590 points
1,556 views
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,030 points
73 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
446 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
55 views
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.