How to identify and run the JUnit test cases dynamically againest the multipledata sets corresponding to each test
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.
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.