mardi 23 février 2021

How can get name of next test case will be executed testNG?

In testNG, how can we get the name of next test case will be executed?

For example, I have the suite as below:

<suite name="example suite">
    <test name="tests">
        <classes>
            <class name="com.example.Example">
                <methods>
                    <include name="test1"/>
                    <include name="test2"/>
                    <include name="test3"/>
                </methods>
            </class>
        </classes>
    </test>
</suite>

The current testcase is "test1", how can I get the name of next test case will be executed (say "test2" in this case)?

Does it have any listener or method to do that or how?

Aucun commentaire:

Enregistrer un commentaire