Forum Discussion

NehaLadani's avatar
NehaLadani
Occasional Contributor
3 years ago

Regarding Data Driven Testing

Hello, 
I reaching out to you for Data Driven Tests.
I have one Excel file as a Data Source with 2 worksheets in that.
I need to enter both worksheet data while sending a payload.
Is there any way that we can get 2 worksheets on board simultaneously?

  • ChrisAdams's avatar
    ChrisAdams
    Champion Level 3

    Hi,

    I cannot readily think of a solution with ReadyAPI here.  You can have two datasources in a test, but the 'inner' would run per row of the outer, but that doesn't sound like what you want.

     

    You might find it easier to use Excel to create a sheet that pulls in the values from the two sheets of interest and then use the new sheet as your datasource.

  • It's possible to do this by referencing the row of data you want to target and use a script or some counter in your test case when referencing values from the second data source. You would use the following format to pass those values in. 
    ${DataSouceTestStep#DataSourceProperty::RowNumber}

    Alternatively, it might be quicker to combine the two sheets of data into a new sheet in excel. 

  • NehaLadani's avatar
    NehaLadani
    Occasional Contributor

    Can you please share the detail of how and where to add this ${DataSouceTestStep#DataSourceProperty::RowNumber}?