-
Notifications
You must be signed in to change notification settings - Fork 288
Removed Discover Warnings in Test Output | Issue #437 #480
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
Merged
jayaranigarg
merged 6 commits into
microsoft:master
from
parrainc:issue437-discoverwarnings
Oct 23, 2018
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bc4ccd7
Fixed issue #437 - Removed discover warnings
52afbf3
Merge branch 'master' into issue437-discoverwarnings
parrainc 16d5d40
Revert "Fixed issue #437 - Removed discover warnings"
a189a86
Solved issue #437 - Removed discover warnings
731c4c8
Merge branch 'master' of https://github.com/parrainc/testfx into issu…
5a32326
Merge branch 'master' into issue437-discoverwarnings
jayaranigarg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
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.
Please add [DummyTestClass] to class DummyTestClassWithCleanupMethods(Line 388) as well.
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.
Just did it, but when added the
[DummyTestClass]attribute toDummyTestClassWithCleanupMethodsclass, one of the unit test failedRunCleanupShouldReturnCleanupResultsForAssemblyAndCla ssCleanupMethodsbecause of the AssemblyCleanup method is not being called.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.
That is weird.
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.
Indeed it is. I did even try debugging the unit test that was using the
DummyTestClassWithCleanupMethodswith the[DummyTestClass]and[UTF.TestClass]but could not observe nothing. and got same behavior except for the part of the assemblyCleanup thing. Notice that when invoking the ClassCleanup it works properly.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.
Tried debugging this. Basically, when we get DeclaredMethods for
DummyTestClassWithCleanupMethods, it is not returning AssemblyCleanup() method in the list of methods for that type and hence AssemblyCleanup() is not getting called. Now, the question is why AssemblyCleanup() is not present in the list when we mention[DummyTestClass]and is present in case of [UTF.TestClass]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.
That's the same question I asked to myself...
I created a mstest project, added a class
CustomTestClassthat inherits fromTestClass, and set up the assembly/class initalize and cleanup methods. It looks like there could be an issue when a test class is inheriting from a custom attribute that inherits from TestClassAttribute.Have you seem any issues regarding to that?
Here's the debug output with
CustomTestClassattribute:expectedValueis a private static int field declared in the test classnotice that with the custom attribute, neither the assembly initialize nor the cleanup were executed
Here's the debug output with
TestClassattribute: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.
@jayaranigarg any updates?
I'm thinking of opening an issue with my inputs in above comments? Would that be alright?
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.
@parrainc : That should be fine. Please raise a separate issue for this and let's get this PR in.