Right now, using the built-in data binding option, only one data sheet from an excel file can be binded to the test. This will prevent the reusability of data from other sheets. Is there a option to bind multiple sheets to test or change the sheet when even required
4 Answers, 1 is accepted
One approach you could take is to take advantage of the Inherit Parent Data Source feature. To use this feature you have multiple parent tests bound to different data sources, but they can all call the same subtest using the test-as-step feature and have this subtest inherit the data that the parent test is bound to. I have attached a screenshot showing this setting. You get to this setting from Test View in Visual Studio. Select the subtest and view its properties while in Test View.
Will this approach work for you?
I have a question here. I am trying to use the multiple sheets from the excel to different test. But it is taking the data from the parent excel.
1. I have a test name (eg: Test1) with excel (Test1.xls)
2. I am using the sheet1 from excel in this Test1
3. I have another Test (Test2) with the excel (Test1.xls) - But Sheet 2
4. If I try to run test2 , - Then it is taking the data from Sheet1 and not from sheet2
5. As you mentioned, Inherit from Parent data source setting is unchecked in Test2.
Could you please help me to solve this problem.
I understood now. It works fine now.
Use the options (Inherit from Parent data source)
I am glad to know you have resolved the issue on your end!