This repository has been archived by the owner on May 27, 2024. It is now read-only.
[trainer] Sanitize both identifier and test case to allow spaces in test name #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dupe of fastlane#21432 so while upstream is updated we can unblock ourselves
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Description
If the test case name has spaces or any special characters, the reported
number_of_failures
will always be 0. This will also not include any failed tests inside the junit report.The reason this was happening was because during the comparison to check the test failure there was a sanitization step that's not applied to the identifier itself so it never matched.
This is from the log output of such a test.
Testing Steps
The easiest way to reproduce it was to use https://github.com/Quick/quick because Quick 7 produces test case names with spaces if the spec names had spaces in it. And when you run
scan
the output will always say the number of failures is 0.I have attached a sample project.
bundle install
bundle exec fastlane test
When it runs the output will show number of failures as 0.
Then you can uncomment the branch line in the
Gemfile
and run bundle install and switch to this branch. Then you will see that the number of failure is 1.SpaceTests.zip