My scenario is : Test script is requiring data from multiple excel files, so i want to have multiple testcasesource on Test method. Is there a way of having multiple testcasesource.
For below Code my explanation:
Iteration 1: It should fetch "TC01" patientdetails and "TC01" loginDetails and run script.
Iteration 2 : It should fetch "KT"patientdetails and "TC01" loginDetails and run script.
Main Hurdle is : how to create IEnumerable in such a way that it handles above two scenario.
My code :
[Test]
[TestCaseSource(typeof(TestDataLogin), "PatientDetails", new object[] { new string[] { "TC01","KT"} })]
[TestCaseSource(typeof(TestDataLogin), "LoginDetails", new object[] { new string[] { "TC01" } })]
public void PatientEnrollment(string userDetails, PatientAndDeviceDetails data,LoginDetails loginData)
{
}
I will be too grateful if someone can help me find solution for such case.