Retriving dataprovider info in BeforeMethod

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Retriving dataprovider info in BeforeMethod

This post has NOT been accepted by the mailing list yet.
I am trying to read dataprovider values in beforemethod. Please suggest the right way to do so.

public class Smoke_IT extends setup {
public static Object[][] getTestData()  {
    return new Object[][] {

public void verifyStatusOfTests(String testName, String testStatus) {
// do verification

public class setup {

// inside beforeMethod I intend to read testName and testStatus values so that I can update this values in a database or file.
public class initiateDB(Object[][] dataProviderParams<How to get data provider values here?>, ITestResult result, ITestContext testContext) {
   updateDB("Insert into db values(<testName>) where run_id=" + runID);