Excel Spreadsheet tab permutations

So I am doing testing on an api that has “1 endpoint to rule them all”… quite the awful thing to test. This end-point takes a GIANT json object with over 200 attributes. 4 ‘header’ level attributes. I have an excel tab that corresponds to each header attribute. Inside each tab has said attributes sub attributes.

Right now I have a test case for each header level attribute. Testing the endpoint with just that attribute filled out. Then I have multiple lines in my excel for that header attribute’s sub attribute permutations. So say Header Attribute 1 has 100 lines. It will run the test 100 times while mapping in all the variables.

Now I need to expand my testing to add all 4 together. I would like to permutate each combination.

example:

payload 1: Att1
payload 2: Att1, Att2
payload3: Att1, Att2, Att3
payload4: ATt1, Att2, Att3, Att4
payload5: Att1, Att3
payload6 Att1, Att4

you can see where Im going with this.

Since Header Attribute 1 has 100 lines. I would wan to run it 100 ^ 4. Each line going through adding permutations of the other header level attributes. Is this possible? I see in the Test Suite Data binding. I can pick the tabs, map all (if i have all the variables in the master test case), set “data iteration” and set “data type”. How do I set this up to work?

would it be possible instead to use predefined excel/table to generate data based on some rules?

Andrej Podhajský said:

would it be possible instead to use predefined excel/table to generate data based on some rules?

That would be great. But each Header level attribute has 1-6 specific Ids that I have to inject at different levels. These ids are maintained in the spreadsheet.

so keep all that needs to be static in excel and generate rest.
btw. there is way how to access excel file using org.apache.poi.xssf.usermodel
personally i did not use it, but here is example to write to file … i think you can start there