Skip to content

Don't check for page location in integration tests #900

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

Closed
php-coder opened this issue Jul 9, 2018 · 2 comments
Closed

Don't check for page location in integration tests #900

php-coder opened this issue Jul 9, 2018 · 2 comments

Comments

@php-coder
Copy link
Owner

The pattern of using Get Location and Should Match Regexp should be avoided. Instead we should test for presence of an element/value on the next page.

Should Match Regexp isn't part of Selenium2Library and we won't have a page source in a log file (as Register Keyword To Run On Failure works only for Selenium2Library keywords) when a test fails. This means, that this test will be hard to debug and only manual reproducing could help us to find a cause of the failure.

@php-coder
Copy link
Owner Author

List of tests that need to be updated:

$ git grep -A1 'Get Location'
src/test/robotframework/series/creation/logic.robot:    ${location}=               Get Location
src/test/robotframework/series/creation/logic.robot-    Should Match Regexp        ${location}  /series/\\d+
--
src/test/robotframework/series/creation/logic.robot:    ${location}=               Get Location
src/test/robotframework/series/creation/logic.robot-    Should Match Regexp        ${location}  /series/\\d+
--
src/test/robotframework/series/creation/logic.robot:    ${location}=               Get Location
src/test/robotframework/series/creation/logic.robot-    Should Match Regexp        ${location}  /series/\\d+
--
src/test/robotframework/series/import/request-logic.robot:      ${requestLocation}=              Get Location
src/test/robotframework/series/import/request-logic.robot-      Should Match Regexp              ${requestLocation}  /series/import/request/\\d+
--
src/test/robotframework/series/import/request-logic.robot:      ${seriesLocation}=               Get Location
src/test/robotframework/series/import/request-logic.robot-      Should Match Regexp              ${seriesLocation}  /series/\\d+
--
src/test/robotframework/series/import/request-logic.robot:      ${location}=                 Get Location
src/test/robotframework/series/import/request-logic.robot-      Should Match Regexp          ${location}  /series/import/request/\\d+
--
src/test/robotframework/series/import/request-logic.robot:      ${requestLocation}=         Get Location
src/test/robotframework/series/import/request-logic.robot-      Should Match Regexp         ${requestLocation}  /series/import/request/\\d+
--
src/test/robotframework/series/import/request-logic.robot:      ${seriesLocation}=          Get Location
src/test/robotframework/series/import/request-logic.robot-      Should Match Regexp         ${seriesLocation}  /series/\\d+
--
src/test/robotframework/series/import/request-logic.robot:      ${requestLocation}=         Get Location
src/test/robotframework/series/import/request-logic.robot-      Should Match Regexp         ${requestLocation}  /series/import/request/\\d+
--
src/test/robotframework/series/import/request-logic.robot:      ${seriesLocation}=          Get Location
src/test/robotframework/series/import/request-logic.robot-      Should Match Regexp         ${seriesLocation}  /series/\\d+

@php-coder php-coder self-assigned this Oct 29, 2018
@php-coder php-coder added this to the 0.4 milestone Oct 29, 2018
php-coder added a commit that referenced this issue Oct 29, 2018
…ocation in integration tests.

Addressed to #900

No functional changes.
php-coder added a commit that referenced this issue Feb 12, 2019
…n in integration tests.

Addressed to #900

No functional changes.
@php-coder
Copy link
Owner Author

It's fixed with the latest changes.

php-coder added a commit that referenced this issue Feb 28, 2019
…on in integration tests.

Follow-up #900

No functional changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant