Is There a Way to Stop Execution of Test Suite on Failure of One Test Case?

88 views
Skip to first unread message

Lodhi

unread,
Mar 10, 2017, 8:28:22 PM3/10/17
to Selenium Users
Hi,

(Skip to last paragraph for concise question).

I have created a bunch of test cases in a suite to automate testing of a web app through Selenium IDE and it's working great. Now I need to run these through command prompt (with CI or through script). I tried selenese-runner, selenium-html-runner and WebDriver conversion to Java/JUnit. I find selenese-runner to be the best tool in my scenario as it can directly run Selenium IDE generated cases without any changes. Other two options are not preferred.

The problem is that my test cases are a series, where cases will depend on previous one. Now I know that test cases should be independent of each other but I think that's more of a unit test case discussion versus integration test cases that I've developed here. If I make each test case a stand-alone, it would mean one test case per suite for me, and I'll have to include, let's say login functionality in each test case, which is not desired.

Is there a way to pause or abort test suite execution on failure of any test case step? I'm looking for exact functionality that Power Debugger plugin (https://addons.mozilla.org/En-us/firefox/addon/power-debugger-selenium-ide/) provides for Selenium IDE, except for I want to run tests through command prompt.

Thanks.  

Shawn McCarthy

unread,
Mar 10, 2017, 9:40:25 PM3/10/17
to Selenium Users
I think that would be in the test runner. For javascript, I believe mocha and/or magellan have that functionality (stop the test suite on the first failure). Others probably/maybe have it too ?

Lodhi

unread,
Mar 10, 2017, 9:57:11 PM3/10/17
to Selenium Users
Thanks for the reply Shawn. That's what I thought. Maybe selenese-runner should have this feature. For now, I have plugged-in "stop on fail/error" code in Java code of selenese-runner and using it locally, will check if it's an acceptable/desirable idea and maybe it can be part of selenese-runner through a new command line config??
Reply all
Reply to author
Forward
0 new messages