I have got some problems with my automation testing. I have nearly around 50 test cases in my Eclipse IDE. All test cases are in different classes. Also, I have got one BaseClass that contains @beforeclass and @afterclass. In @beforeclass, the browser opens, URL opens and website URL opens then it does login procedure. Then my test cases work. All of them begin with @Test annotation. I connect them with using TestNG suite.
Here is my question: I want to use priority (like @Test (priority=1)) for these classes (test cases) for reducing the workforce. But when there is a problem with my codes; my automation test stops. I want to, it would continue besides the stop.
The second option is using TestNG. TestNG is ok but every case, the browser opens. How can I create a test like just opening one browser then run all test cases in that browser?
By the way here is my example test case for your imagine all picture:
-@beforeclass: open browser - open URL - login
@test1: go to products screen - click create a product - create a product with initial quantity - then click save button, it should be in the products screen again. @test2: click create a product button again. - create a product without initial quantity - click save button, it should get an error. click the cancel button to continue the third @test @test3: so on...
-@afterclass: close browser
I really appreciate for your help! Thank you!
Aucun commentaire:
Enregistrer un commentaire