-1

I put 4 testcases into one testsuite and in each testcase I have code to catch the NoSuchElementException. I want: if any one testcase threw out NoSuchElementException, the testsuite execution should stop.

For Example, if first testcase throws NoSuchElementException, then testcase 2&3&4 should not execute anymore. if the second testcase throw out a NoSuchElementException, then testcase 3&4 should not execute anymore.

Sandeep
  • 455
  • 4
  • 26
  • the ruby implementation used to have a `--fail-fast` option, but it seems removed. – Len Jun 23 '16 at 12:35

1 Answers1

0

You didn't specifed the language. If Java you can use TestNG framework and dependOnMethods annotations. Here is simple example: http://www.mkyong.com/unittest/testng-tutorial-7-dependency-test/

kotoj
  • 769
  • 1
  • 6
  • 25