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

[tests-only] Remove jarnaiz\JUnitFormatter\JUnitFormatterExtension from acceptance tests #39964

Merged

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Apr 8, 2022

Description

Sometimes when tests fail the behat run fails with errors in jarnaiz\JUnitFormatter like:
https://drone.owncloud.com/owncloud/files_spaces/270/16/13

PHP Warning:  DOMDocument::loadXML(): Input is not proper UTF-8, indicate encoding !
Bytes: 0xC4 0x4E 0x1B 0x6C in Entity, line: 13 in /var/www/owncloud/testrunner/apps/files_spaces/vendor-bin/behat/vendor/jarnaiz/behat-junit-formatter/src/Formatter/JUnitFormatter.php on line 316
PHP Warning:  DOMDocument::loadXML(): CData section not finished
And the downloaded content should be "sample file  in Entity, line: 13 in /var/www/owncloud/testrunner/apps/files_spaces/vendor-bin/behat/vendor/jarnaiz/behat-junit-formatter/src/Formatter/JUnitFormatter.php on line 316

Various special characters in output are confusing that extension.

The extension was added a long time ago in PR #19680 - it is supposed to create an output/report.xml file that contains test result information. But actually it does not currently work properly anyway. For me locally it only reports the test suite that was run and no result data.

I discovered j-arnaiz/behat-junit-formatter#12 - the extension has been abandoned for a long time. And we do not try to use the output anyway. The current Behat https://behat.org/en/latest/user_guide/command_line_tool/formatting.html has a junit output format available. We could investigate that separately, maybe it will help us to be able to more easily automatically analyze test results, compare with expected-failures etc.

But for now, this PR removes the abandoned extension so that it will not cause us any more trouble.

Related Issue

owncloud/QA#737

How Has This Been Tested?

CI and local acceptance test runs.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@phil-davis phil-davis self-assigned this Apr 8, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis phil-davis marked this pull request as ready for review April 8, 2022 05:13
@individual-it individual-it merged commit b31266f into master Apr 8, 2022
@delete-merged-branch delete-merged-branch bot deleted the remove-jarnaiz-JUnitFormatter-JUnitFormatterExtension branch April 8, 2022 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants