How will you implement parallel execution of tests in TestNG for quick implementation in your Selenium automation framework?
Shubham G.
Tech Entrepreneur | CEO & Founder at HikeQA | Co-Founder at Billebon | Scaling Quality & Comfort for Business & Travel
The answer is that TestNG supports data driven testing with the help of DataProvider annotation that helps us to supply test data from various external sources like Excel sheets or databases. I can build a method annotated with the help of@DataProvider, to provide test data and also annotate the test methods with @Test(DataProvider) for implementing the tests with various data sets. This helps in executing the similar test logic with different input values and judge the behavior that is expected. @DataProvider (name= “loginData”) public Object [] [] getLoginDats() { return new Object[] [] { {“,user1”, “pwd1”}, {“user2”, “pwd2”}, }; }