8

Is it possible when running an entire test suite to make it stop on an assert failure?

It currently stops running that failed test then continues to run the next test.

I want it just to stop and fail on the first failure.

Thanks

twiz911
  • 634
  • 1
  • 9
  • 18
  • Seems like the exact opposite of [this question](http://stackoverflow.com/questions/3714118/is-it-possible-to-get-selenium-ide-to-run-the-whole-test-suite-even-though-error). – shamp00 Feb 28 '12 at 09:04
  • After substantial research, I believe this is impossible in Selenium IDE... – twiz911 Mar 02 '12 at 00:42
  • weirdly enough, my version of selenium IDE (no additional plugins) does stop on assertValue fails. And does not stop on verifyValue fails. Just fine. – user18099 Jun 01 '17 at 08:03

4 Answers4

8

I found https://addons.mozilla.org/en-US/firefox/addon/power-debugger-selenium-ide/ which is a Selenium IDE plugin which adds a Pause on fail button to Selenium IDE.

twiz911
  • 634
  • 1
  • 9
  • 18
1

In selenium ide we can add Pause on fail it is pause on fail button by simple install one plugin in the selenium IDE. When pause on fail is turned on, Selenium IDE would pause the execution of the test case when there is an error is produced or a command failure

Install plugin from https://addons.mozilla.org/en-US/firefox/addon/power-debugger-selenium-ide/

Ankit jain
  • 4,198
  • 4
  • 19
  • 24
0

don't know if you ever got this issue resolved but I use a plugin to cater for this issue.

The plugin is 'Selenium debugger' and I was able to download it from

https://addons.mozilla.org/en-US/firefox/addon/power-debugger-selenium-ide/

install using firefox. Then, once firefox has restarted, an additional icon will appear on the Selenium toolbar (pause on fail). Works a treat for me!

The only thing of note is that if the script fails on the last line of a test CASE it may still continue to the next test case in the suite. The way round this that I use is to add a 'pause 100' entry to the last line of each test case so that the plugin can 'hook' onto it.

I hope his helps

Ian
  • 1
-1

You could write the assert into if and on false stop the run.

Arian
  • 3,183
  • 5
  • 30
  • 58
  • Thanks - what is the command to stop the suite? My question is the same as http://old.nabble.com/suite-stop-on-error-td27689346.html which hasn't been answered - is it impossible? – twiz911 Feb 28 '12 at 14:28
  • I'm not into selenium IDE, so we will have to do try and error if you don't know it. so try: 'selenium.stop();' in java/JUnit4/selenium or 'driver.quit();' for java/JUnit4/WebDriver – Arian Feb 28 '12 at 14:38