1. I am preparing automation test cases for sanitytesting in my project.
2. So I have prepared one class which has 8 tests (methods) defined inside it.
Something like this :
Class name > Sanity
@Before test
1. @test> VerifyLogin() > takes input test data(eg. username,pwd,browser)
2. @test> VerifyHomePage()
3. @test> VerifyPortfolio()
4.
5.
6.
7.
8. @test > VerifyLogout()
@Aftertest
Now I need to run this class mutiple times with different set of test data.
Eg.
Test data
1. username1, pwd1, browser1
2. username2, pwd2, browser2
How should i implement Testng Dataprovider in it.... ??? Or any other solution to achieve my objective ?
Can I define DataProvider at class level ??
Instructor
Ashish Thakur Replied on 13/04/2021
You will have to run testng programatically
Please watch data driven framework
Its explained in detail in it