Skip to content
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

Remove handling unescaped URLs in suites #524

Merged
merged 8 commits into from
Aug 6, 2020

Conversation

wblachowski
Copy link
Contributor

@wblachowski wblachowski commented Sep 23, 2019

Removed escaping URLs in suite XMLs.
As a result, suite file has to be a valid XML file to be successfully processed.

Description

This change removes additional escaping of URLs present in suites. Current behaviour expects all URLs to be unescaped and thus suite files are often invalid XMLs. Escaping URLs on your own leads to bugs described in #441.

By enforcing escaped URLs we make sure all suite files are valid XML files and prevent confusion regarding this topic. In case where there are unescaped URLs in a suite file, there will be an according error displayed, e.g:

Something is wrong with your suite definition! Detected errors:
Unexpected character '<' (code 60) in attribute value
 at [row,col {unknown-source}]: [24,45]

which make it easy to fix all incorrect files.

Motivation and Context

This is a second approach to a bug described in #441.
Handling both escaped and unescaped URLs was implemented in #460, however it's been discussed that it may not be the best solution.

Upgrade notes (if appropriate)

Migrating to the version with this feature could require updating project's suite files to ensure that all URLs are properly escaped.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have reviewed (and updated if needed) the documentation regarding this change

I hereby agree to the terms of the AET Contributor License Agreement.

@plutasnyy
Copy link
Contributor

Is it possible that after this change some suites won't work? If yes we could add some upgrade notes, otherwise don't care :D

@Test(expected = ParseException.class)
public void testParse_withUnescapedUrls_expectParseException() throws Exception {
URL resourceURL = getClass().getResource("/testSuiteWithUnescapedUrls.xml");
File testSuitFile = new File(resourceURL.toURI());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo testSuiteFile

@tMaxx tMaxx merged commit 8133a51 into wttech:master Aug 6, 2020
@annabudziszewska
Copy link
Collaborator

Tested and accepted
Version: 3.3.1.SNAPSHOT

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

Successfully merging this pull request may close these issues.

5 participants