Question

I'd like to be able to specify a listener at suite level, but tell a few of the tests to not use the listener.

How can this be done? Thanks

Testng.xml file

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Beta Tests" verbose="2" parallel="classes" thread-count="2">

<listeners>
<listener class-name="com.progr.util.WebDriverListener"></listener>
</listeners>
<tests>

Example test that I don't want using the listener

@Test(dataProvider = "DP_MVPLoanApprovedMediumAmount", groups = {
            "regression", "smoke"}, /*dependsOnMethods = {"MVP_LoanApprovedMediumAmount"},*/
     invocationCount = 1, priority = 26, enabled = true)
    public void MVP_CheckStatusInDB(String testNum, String ScenarioName) throws Exception {
        StringBuilder softAssertions = new StringBuilder();

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top