-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed failing location query robot test. [5.1] #1652
Conversation
f374f50
to
6181499
Compare
6181499
to
9690ec4
Compare
The real problem is in
With CMFPlone master the tests will pass. But then open parts/test/robot_report.html, go to the link integrity tests and click them open. It will show one failure for Zoom in and you see that a screen shot was generated because of the initial failure: What is happening in this specific case is:
You can see the same when you start the tests with This pull request addresses the symptom by doing a The real fix would be to fix (p.a.)robotframework or selenium or jenkins or whatever to not treat these initial failures as real failures. I am happy if someone else dives into that... |
cc @thet @jensens @gforcada . |
Alternatively, we could switch off the creation of screen shots on failure. That would also be a workaround, but currently the html reports are not visible on jenkins, so no screen shots are visible. (Well, I think I did see some screen shots in a list somewhere, but I cannot find them.) If the absence of screen shots means the tests become green again, then I am happy. I don't know where this could be changed without affecting other users of plone.app.robotframework. This seems to be where the default is set: https://github.com/plone/plone.app.robotframework/blob/master/src/plone/app/robotframework/selenium.robot#L14 |
I think plone.app.robotframework is the wrong place to set this variable anyway, To screenshot or not is more a feature to enable/disable from the outside, so i.e. as an environment variable. If this is not possible, may we unset/blank this variable before a The real fix would be to fix robotframeworks selenium to detect failures correctly, right? |
Some notes. We pass
When we have a keyword for running on failure, this is run using a decorator in Selenium2Library: The retrying for There is an issue in Selenium2Library which suggests to remove
So then you can still override what happens on failure by passing |
This interferes with Wait until keyword succeeds: an initial failure is seen as total failure instead of checking the retries of this keyword. Added `Plone Test Setup` and `Plone Test Teardown` keywords. In that last one, in case of a failure do what used to be done by run_on_failure. This means a screen shot by default, but you can override this on the command line with for example ROBOT_SELENIUM_RUN_ON_FAILURE=Debug, or Nothing to ignore it. See plone/Products.CMFPlone#1652
Branch: refs/heads/master Date: 2016-06-29T16:51:56+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.robotframework@d513cb7 Do not use run_on_failure from Selenium2Library. This interferes with Wait until keyword succeeds: an initial failure is seen as total failure instead of checking the retries of this keyword. Added `Plone Test Setup` and `Plone Test Teardown` keywords. In that last one, in case of a failure do what used to be done by run_on_failure. This means a screen shot by default, but you can override this on the command line with for example ROBOT_SELENIUM_RUN_ON_FAILURE=Debug, or Nothing to ignore it. See plone/Products.CMFPlone#1652 Files changed: M CHANGES.rst M src/plone/app/robotframework/selenium.robot Repository: plone.app.robotframework Branch: refs/heads/master Date: 2016-06-29T20:55:40+02:00 Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com> Commit: plone/plone.app.robotframework@fdea4a1 Merge pull request #57 from plone/maurits-no-run-on-failure Do not use run_on_failure from Selenium2Library. Files changed: M CHANGES.rst M src/plone/app/robotframework/selenium.robot
Branch: refs/heads/master Date: 2016-06-29T16:51:56+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.robotframework@d513cb7 Do not use run_on_failure from Selenium2Library. This interferes with Wait until keyword succeeds: an initial failure is seen as total failure instead of checking the retries of this keyword. Added `Plone Test Setup` and `Plone Test Teardown` keywords. In that last one, in case of a failure do what used to be done by run_on_failure. This means a screen shot by default, but you can override this on the command line with for example ROBOT_SELENIUM_RUN_ON_FAILURE=Debug, or Nothing to ignore it. See plone/Products.CMFPlone#1652 Files changed: M CHANGES.rst M src/plone/app/robotframework/selenium.robot Repository: plone.app.robotframework Branch: refs/heads/master Date: 2016-06-29T20:55:40+02:00 Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com> Commit: plone/plone.app.robotframework@fdea4a1 Merge pull request #57 from plone/maurits-no-run-on-failure Do not use run_on_failure from Selenium2Library. Files changed: M CHANGES.rst M src/plone/app/robotframework/selenium.robot
Branch: refs/heads/master Date: 2016-06-29T16:51:56+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.robotframework@d513cb7 Do not use run_on_failure from Selenium2Library. This interferes with Wait until keyword succeeds: an initial failure is seen as total failure instead of checking the retries of this keyword. Added `Plone Test Setup` and `Plone Test Teardown` keywords. In that last one, in case of a failure do what used to be done by run_on_failure. This means a screen shot by default, but you can override this on the command line with for example ROBOT_SELENIUM_RUN_ON_FAILURE=Debug, or Nothing to ignore it. See plone/Products.CMFPlone#1652 Files changed: M CHANGES.rst M src/plone/app/robotframework/selenium.robot Repository: plone.app.robotframework Branch: refs/heads/master Date: 2016-06-29T20:55:40+02:00 Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com> Commit: plone/plone.app.robotframework@fdea4a1 Merge pull request #57 from plone/maurits-no-run-on-failure Do not use run_on_failure from Selenium2Library. Files changed: M CHANGES.rst M src/plone/app/robotframework/selenium.robot
Sigh, the 5.1 robot tests fail again. This pull request is almost finished, but is failing too:
This pull request should no longer be relevant:
|
I am rebuilding http://jenkins.plone.org/job/plone-5.1-python-2.7-robot/562/consoleFull just for good measure. |
Well, I hope this fixes it anyway, similar to what Johannes has already done. Locally, with Firefox 46 (or chrome) this change is not needed, at least not when running the location query test individually. But Jenkins has been failing for a while, for example http://jenkins.plone.org/job/plone-5.1-python-2.7-robot/558/robot/