vendredi 28 juin 2019

How to add data provider values in testng extent-report version 2.41.2(relevantcodes)

I have used Dataprovider to pass my test values and I want these values to get displayed in my testNG extent report. I have seven test cases and these test cases run on multiple test values passed in DataProvider. By clicking on the method name in extent report, I want the report to display that on which values the test has been executed.`

Here is my dataprovider class:

public class MyDataProvider {

@DataProvider
public Object[][] realTimeConfiguration() {
    return new Object[][] {

             new Object[] {"safari", "safari5.1","macoslion" },
            new Object[] { "chrome", "chrome76", "win10", "1280x1024" },
             new Object[] {"chrome", "chrome75","win10","1280x1024" },
             new Object[] {"chrome", "chrome74","win10","1280x1024" },
             new Object[] {"chrome", "chrome73","win10","1280x1024" },
             new Object[] {"chrome", "chrome72","win10","1280x1024" },

             new Object[] {"firefox", "firefox68","win10","1280x1024" },
             new Object[] {"firefox", "firefox67","win10","1280x1024" },
             new Object[] {"firefox", "firefox66","win10","1280x1024" },
             new Object[] {"firefox", "firefox65","win10","1280x1024" },
             new Object[] {"firefox", "firefox64","win10","1280x1024" },

    };

}

}

Thanks in advance !!

Aucun commentaire:

Enregistrer un commentaire