Repository navigation
Run on failure flag - #349
Conversation
…brary from QAR-48273-upstream-se2lib-build-fails to master * commit 'f7835852e40ecb35399ac9fdbeee8c706706b542': QAR-48273: Applied fix for 'Choose File' bug, from Helio Guilherme (532295c) QAR-48273: Fixed build failure caused by extra content in output.xml
…brary from negative-index to master * commit '1df05fe7cf1dbe77aa9de06fa8b4e37092c68651': QAR-48165: Removed unnecessary import of jQuery QAR-48165: Added tests for negative indexes, tidied code QAR-48165: Added support for negative indexes in Robot keywords
|
Does this look good to merge? |
|
Ping |
|
Sorry for the delay on this @frishberg, I'll review it tonight. |
There was a problem hiding this comment.
Shouldn't ${ON FAIL COUNT} be defined here?
There was a problem hiding this comment.
I'm not sure. I don't need it outside the one test case.
There was a problem hiding this comment.
I gotcha. I'm fine with this then.
There was a problem hiding this comment.
The way this test is setup it looks like there's a keyword called Run On Failure Only Once. My recommendation is to add this test case to test/acceptance/keywords/run_on_failure.txt since it actually tests that keyword. This doesn't need to be in its own file.
There was a problem hiding this comment.
OK, I'll make that change.
There was a problem hiding this comment.
Actually, @zephraph, the reason this is in its own suite is because the keyword I am registering to run on failure is a custom keyword defined in a separate library. The Suite Setup commands used in test/acceptance/keywords/run_on_failure.txt will not work if I am importing that library, because it gets imported in addition to Selenium2Library, requiring the use of Set Library Search Order to be run before the Suite Setup commands, to disambiguate.
There was a problem hiding this comment.
Yeah, I understand. I recommend something more along these lines:
*** Keywords ***
Prefer Custom Keywords
Import Library CustomSeleniumKeywords
${old order}= Set Library Search Order CustomSeleniumKeywords
*** Test Cases ***
Run On Failure Keyword Only Called Once
[Setup] Prefer Custom Keywords
...
[Teardown] Restore Old Search OrderThere was a problem hiding this comment.
Much better! I will try that. I didn't know about Import Library.
|
If you're able to respond to the feedback I left we might be able to get this in the 1.7 release. |
There was a problem hiding this comment.
OK, I've got everything in the one test file, but I had to introduce this __init__ hack, so that the Go To command would work with this library.
|
Everything looks okay, but I still can't merge until you're passing the Travis CI build. |
|
Oops! Didn't see that it was failing. Looking now. |
|
Looks like I just had to remove |
|
Looks good to me! Thanks for the contribution. 👍 |
Run on failure keyword only once.
|
Thank you! |
|
You won't see it live until the 1.7 release. I'm trying to push out 1.7 soon, but I don't have a concrete release date. |
|
@zephraph, I am wondering if you have a rough release date for 1.7. This pull request is a prerequisite for a feature we are trying to get into http://github.com/ncbi/robotframework-pageobjects, to allow the use of selectors (names that stand in for locators - see https://github.com/ncbi/robotframework-pageobjects) in Robot tests with Selenium2Library keywords. A lot of tests we have been writing have been unable to use this feature, leading to a bit of technical debt. (We use selectors to keep DRY and encapsulate markup details in one place.) Thanks for all the work you're doing, and let me know if we at NCBI can be of any help. |
|
@frishberg, I'd like it to be today if at all possible. I'm a newcomer to this project though, so I didn't want to push out a release until the other contributors have had a say. Expect it to land this week, likely in the next day or two. |
|
OK, thank you. |
Trying this again with branch rebased on rtomac's master.