-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1914ea2
commit a5705ca
Showing
2 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a5705ca
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.
Shouldn’t there be a statement to reset this flag
skipRemainingTestsInContextOnFailure <- false
at the beginning of each context?
a5705ca
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.
This line
canopy/src/canopy/runner.fs
Line 132 in a5705ca
You realistically have 3 usage scenarios
You as a user can control
skipNextTest
however you like for custom scenariosSetting
skipAllTestsOnFailure
to true will result in all remaining (even across context) tests to be skipped after a single failureSetting
skipRemainingTestsInContextOnFailure
to true will result in all remaining tests in the current context being skipped after a single failure. Following contexts will run as normal.a5705ca
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.
I agree with you about the scenarions. But as I see it in the current code, once
skipRemainingTestsInContextOnFailure
is set to true by the user code, it remains as such for all subsequent contexts. I think it should be reset automatically at the beginning of each context loop.a5705ca
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.
a5705ca
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.
Yes, that's true; otherwise, it will behave as a duplicate for the
skipAllTestsOnFailure
flag.a5705ca
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.
It wont duplicate
skipAllTestsOnFailure
becauseskipAllTestsOnFailure
works across contextExample
with
skipRemainingTestsInContextOnFailure
on, the way it works in the above code(skipNextTest is reset here)
with
skipAllTestsOnFailure
onI tested this and showed a co worker and it seems reasonable to me. I can change it though since its the feature you are requesting. Just make an example that illustrates what you want if it differs.
a5705ca
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.
If it works as described above, it will be perfect - that's exactly what I want. Thanks very much for your effort
a5705ca
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.
When are you going to create a new version in NuGet for this change?
a5705ca
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.
a5705ca
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.
Available here: https://www.nuget.org/packages/canopy/0.9.35
Also updated to the latest Selenium that came out today.
Let me know if you have any issues!
a5705ca
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.
Great.Thank you.
a5705ca
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.
One thing I noticed that TeamCity reports skipped tests as passed now. Shouldn't these tests be logged as ignored or muted by the reporter?
a5705ca
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.
https://github.com/lefthandedgoat/canopy/blob/master/src/canopy/reporters.fs#L170
Looks like it does nothing for skipped. I will have to figure out what command to send to TC to make this work.
a5705ca
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.
Hi Chris,
Here is the documentation for TeamCity interactions.
https://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity
IMO, you should define new functions for “IReporter” for skipped tests as
teamcity[testIgnored name='testName' message='ignore comment']
a5705ca
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.
Hi Chris,
I've added some changes to allow reporting ignored tests in TeamCity and other reporters. Would you please review and apply these ASAP if you approve them.
P.S: I tried to attach this diff as a file but GITHUB kept telling me
Something went really wrong, and we can’t process that file.
, so I pasted above instead.a5705ca
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.
a5705ca
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.
a5705ca
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.