I'm aware of the Run Keyword and Continue on Failure / Run Keyword And Ignore Error / Run keyword and return status Builtin keywords but I have a very wide set of test cases that should not be stopped for any reason on a specific scenario and I was wondering if there is an option not to make the execution stop on a failure by default, without having to manage it through these keywords and adding a non-business related syntax in my upper layer keywords.
Is there a way to configure Robot Framework so the execution is not stopped by a failure
3.2k views Asked by Albert Montes Cobo AtThere are 2 answers
Bryan Oakley
On
Generally speaking, robot simply isn't designed to work the way you want. It's designed to exit a test when a keyword fails unless you explicitly run that keyword with one of the special keywords (eg: run keyword and continue on failure).
In some very limited cases, you can get this behavior by using a template that calls run keyword and continue on failure for every test step. This technique will only work if your test case is made up strictly of keywords, and doesn't try to save keyword results to variables.
For example, consider this test:
*** Test cases ***
Example
log step one
log step two
fail something went wrong
fail something else went wrong
log last step
If you run the above test, it will stop on the first failure. However, by adding a test template that uses run keyword and continue on failure, all the steps will run before continuing to the next test:
*** Test cases ***
Example
[Template] Run keyword and continue on failure
log step one
log step two
fail something went wrong
fail something else went wrong
log last step
This is what the report looks like with the above test:
Related Questions in PYTHON
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
- python how to write list of lists to file
- Removing URL features from tokens in NLTK
- Optimizing for Social Leaderboards
- Python : Get size of string in bytes
- What is the code of the sorted function?
Related Questions in TESTING
- How does Robot's Telnet library work?
- Behat doesn't load extensions?
- Load additional CONFIG file with values
- rails controller test failing non-deterministicly wrt state leak (I think)
- Ordering tests using trial twisted
- Unexcepted failed Gavel/Dredd test
- How to use Jasmine and CucumberJS with Protractor
- Django login tests session problems
- How to mock specific RequireJs dependencies while unit testing
- Test case for WCF REST Service
- how to test this business logic
- Protractor - How to get first or last CHILD value
- Factory Not Registered in rspec but found in console
- Pick out certain lines from files
- Selenium stops running after click() function runs
Related Questions in AUTOMATED-TESTS
- How to automate UI interaction during acceptance test run
- Teststack.white cannot find Toolstrip item
- Unexcepted failed Gavel/Dredd test
- Keyword 'AppiumLibrary.Open Application' expected 1 to 2 non-keyword arguments
- How to set test case fail and pass messages in Casper js?
- Wait until scrollbar fades when using UI Automator
- Teststack.White Drag and Drop Problems
- list of test step results in groovy script
- Is there a before() function in Protractor?
- Different behaviour of compiler when called in script by LaunchControl
- Karma not recognizing jQuery
- How to perform datadriven approach using coded ui VSTS 2013
- Multiple Scope value in Binding (Specflow)
- python run function in external module containing doctest.testmod()
- How to use loop in nightwatch.js
Related Questions in ROBOTFRAMEWORK
- How does Robot's Telnet library work?
- Keyword 'AppiumLibrary.Open Application' expected 1 to 2 non-keyword arguments
- What does "--dryrun" do in Robot Framework pybot command?
- How to access second element using relative Xpath
- ClassFormatError: Invalid method Code length 85551 in class file pdfminer/glyphlist$py
- Robot Framework, Selenium2Library two field with same id
- Distinguishing between elements with the same name in RobotFramework
- Is it possible to change my web application server date using Robot Framework & RIDE?
- How can we validate tabular data in robot framework?
- How to embed arguments into Robot Framework keyword name
- Want to filter out failure Message from my robot framework output files
- [Robot Framework][RIDE]error: [Errno 10061] No connection could be made because the target machine actively refused it
- Can Robot Framework Support External Variables?
- How to remove white space in a string with Robot Framework?
- Robot Framework - customise log output
Related Questions in ATDD
- Cucumber: tag scenario on the fly
- Redirect URL test using Cucumber Protractor and Typescript
- Is it correct in BDD to bypass your service layers and change state of data for test setups?
- how complete should SBE specifications be?
- how to summarise and navigate BDD stories when you have so many?
- where does specification by example complement/replace traditional requirements documentation?
- How to count tags on running scenarios in Ruby Cucumber?
- How to extract weekly report and log from a test under execution for 60 days in Robot Framework
- Is there any After keyword is available like Background for running cucumber steps
- user stories captured and refined using gerrit as the main communication medium
- RobotFramework: Maximum limit of started keywords exceeded
- Rerun Failed test cases from output.xml using jython in robot/RIDE
- Applying BDD testing to batch scenarios?
- Form field not found when executing feature file in Behat with Selenium
- Is it possible to call ASP.NET MVC controller methods from a test in a running MVC web application?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)

Although it feels a bit counter intuitive that you should want to continue when you've encountered an erronous situation, given that you may no longer be in control of the application. This in itself should be prevented. However, that said.
Given that you are already familiar with the family of Run and continue keywords, there is not much else to suggest and to answer the question with an affirmative: No.
The only approach is to wrap the keywords in a Run and Continue keyword.