1

<

?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Loan Department">

    <groups>
    <run>
    <include name="smoke"/>
    </run>
    </groups>
    
    <listeners>
        <listener class-name="Test.Listeners" />
    </listeners>
    <parameter name="URL" value="www.google.com" />

    <test name="Car Loan">
        <classes>
            <class name="Test.Day3">
                <methods>
                    <include name="hello5" />
                </methods>
            </class>
        </classes>
    </test>
    <test name="Personel Loan">

        <classes>

            <class name="Test.Day1">
                <methods>
                    <include name="hello1" />
                </methods>
            </class>
            <class name="Test.Day2" />
        </classes>
    </test>
</suite>

I have applied the group condition in suite level with a tag called "smoke". Under "Personel Loan" test, I have 2 classes one is "Day1" and other is "Day2". In Day1 class, I have 2 methods "Hello" and "Hello1". I have added tag "smoke" for "Hello" but not "Hello1", but I have added "Hello1" in include tag in xml file. In result it run method "Hello1" but not "Hello", it means it is surpassing the group condition here ?

  • Usualy you put include, and only calss name not a methods, because if you go down to the methods, you dont need includes. anyway it seems tahat is overriding the methods. – Gaj Julije Mar 21 '21 at 19:25

0 Answers0