Kakarot
Kakarot

Reputation: 19

Groups and Classes tag are not getting executed

When I'm trying to run the regression.xml file the file is not getting executed, while when I'm removing the groups tag the file it runs perfectly but I want to run the file including the groups tag Is there any solution for this i have tried multiple solutions but only groups tag are not getting executed.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Regression Suite">
<test name="Regression">
    <groups>
        <run>
            <include name="regression" />
        </run>
    </groups>
    <classes>
        <class name="ui._4_Assertion_VerifyTitle_" />
        <class name="ui._3_Annotations_BeforeMethodVsBeforeTest" />
    </classes>
</test> <!-- Test -->

Upvotes: 0

Views: 26

Answers (1)

sashkins
sashkins

Reputation: 931

To achieve your goal, at least one @Test from ui.4_Assertion_VerifyTitle or ui._3_Annotations_BeforeMethodVsBeforeTest classes should have a 'regression' group. e.g.:

@Test(testName = "Test1", description = "Checking something", groups = {"regression"}) 
public void test() {}

Your XML snippet looks correct, if you say that all tests run when 'groups' section is absent, but none run when the same section is present, this can only mean one thing: no tests with group 'regression' are present in the selected classes.

Upvotes: 0

Related Questions