| Author |
Skipping Test Cases in Test Suites.
|
Somnath Mallick
Ranch Hand
Joined: Mar 04, 2009
Posts: 471
|
|
Hello Everyone,
I have run into a problem while writing JUnit test cases for an automation project i have been handed over for a few weeks. Will try to give you as much details as possible, if i miss anything let me know. Here goes:
1. The testing involves 6 test suites each test suite has around 8 test cases.
2. The test suites are executed via ant.
The Junit test cases mostly include Selenium to automate web browser validations.
The issue i am facing is:
When one of the major validations in one of the test case fails, lets say in the 4th test case, it should stop executing the remaining of the test suite and skip over to the next test suite. Is there any way of achieving this?
Thanks!
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
|
Not easily. JUnit is designed to run all your tests. I think you would need to write a custom runner to do what you want.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Somnath Mallick
Ranch Hand
Joined: Mar 04, 2009
Posts: 471
|
|
|
Hmmm... Seems i have some more reading to do! Thanks Jeanne.
|
 |
 |
|
|
subject: Skipping Test Cases in Test Suites.
|
|
|