Test Data as Variable Type

Hello,

i just want to ask if there’s anyone here already tried using a “Test Data” Type of variable in a test case.

I already tried doing “Test Data Value” but what I wanna do is to just simply pass the test data table and loop from there instead of declaring a variable for each data.

here’s what it looks like:

here’s the implementation:

image

But this is not working.

Can you help?

Hi Marvin,

Try doing this:

//locate your test data
TestData tData = findTestData("Your_Test_Data_Location")

//use list iterator to retrieve row per row
for (int index = 0; i <= tData.rowNumbers; i++)
{
     fData.getAllData().listIterator(index).next()
}

What it will do is it will get the whole row.

Hope that helps. . . :slight_smile:

1 Like