-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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] Reporting expected failures when running a single feature #37852
Conversation
8c676b8
to
03bff0e
Compare
tests/acceptance/run.sh
Outdated
for unexpected_passed_value in "${UNEXPECTED_PASSED_SCENARIOS[@]}" | ||
do | ||
# check only for the running feature | ||
if [[ $unexpected_passed_value != *"${BEHAT_FEATURE}"* ]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be the other way around? We want to add the to ACTUAL_UNEXPECTED_PASS if it is the BEHAT_FEATURE.
Also,
- I think BEHAT_FEATURE is set to something like
tests/acceptance/features/apiComments/comments.feature:42
but the "unexpected" array will have justapiComments/comments.feature:42
in it. See code that calculatesSUITE_SCENARIO
from the end of a path. - it needs to not match entries like
apiComments/comments.feature:421
- the last*
here is probably not needed.
It might be easier to use the bash regex-match operator =~
- then you can match strings exactly at the start or end. See examples in run.sh
that use =~
Or actually I think that after extracting the ``apiComments/comments.feature:42` part from BEHAT_FEATURE then you can check for an exact match - no need for "glob *" or regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After BEHAT_FEATURE
is set to apiComments/comments.feature:42
I think we can directly check for an exact match using==
by removing the first and last *
from *"${BEHAT_FEATURE}"* ]]
Codecov Report
@@ Coverage Diff @@
## master #37852 +/- ##
=========================================
Coverage 64.75% 64.75%
Complexity 19403 19403
=========================================
Files 1285 1285
Lines 75816 75816
Branches 1336 1336
=========================================
Hits 49094 49094
Misses 26328 26328
Partials 394 394
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
9d8f61a
to
fcbca9a
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
4e2381d
to
1c42450
Compare
Description
Reporting log when running just a single feature or single scenario that are listed in
expected-failure.txt
. Previously we used to get the log about scenarios that were actually running and also for scenarios that were not running but were listed inexpected-failure
.Related Issue
How Has This Been Tested?
Types of changes
Checklist: