0

I have a data configured in Excel Sheet. Excel sheet name is equal to Test Class Name and first Sheet Contains testMethods and correspoing data sheetnames. i have constucted a Map>> object is like Map>. i want to execute one test case with list of map data. so assume that my data is ready now. i want identify the test method in the test class and i need to execute the method dynamically as a JUnit. iam totally struck over here. please help me in this. Regards, Saran Kumar P.

1 Answer 1

1

Your description is rather confusing, but I assume JUnit's parameterized tests could be a solution: https://github.com/junit-team/junit/wiki/Parameterized-tests

That mechanism allows you to have (1) one or more test methods accepting some test data and (2) one method loading or generating a collection of such test data. The test methods are then executed for each entry in the generated dataset.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.