How will you implement parallel execution of tests in TestNG for quick implementation in your Selenium automation framework?

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”}, }; }

要查看或添加评论,请登录

Shubham G.的更多文章

社区洞察

其他会员也浏览了