Skip to content

Conversation

@hughbe
Copy link
Contributor

@hughbe hughbe commented Jan 10, 2020

Proposed Changes

  • Add IClassFixture<ThreadExceptionFixture> to all tests
Microsoft Reviewers: Open in CodeFlow

@hughbe hughbe requested a review from a team as a code owner January 10, 2020 21:55
@hughbe hughbe force-pushed the Add-ThreadExceptionFixture branch from 8ca6f8b to cb59c5c Compare January 10, 2020 21:57
@sharwell
Copy link
Contributor

sharwell commented Jan 10, 2020

Would it be better to have a common abstract base class for all tests? It would certainly be more maintainable.

@weltkante
Copy link
Contributor

weltkante commented Jan 11, 2020

Its also possible to build something like the AssemblyFixture example, would certainly be less redundant then annotating every class manually. Though if you are already using a TestFrameworkAttribute you need to make sure you build off of that (subclassing it) when implementing an AssemblyFixtureAttribute since you most likely can only have one test framework per assembly.

@hughbe hughbe force-pushed the Add-ThreadExceptionFixture branch from cb59c5c to 316c834 Compare January 11, 2020 10:22
@codecov
Copy link

codecov bot commented Jan 11, 2020

Codecov Report

Merging #2684 into master will increase coverage by 0.00477%.
The diff coverage is n/a.

@@                 Coverage Diff                 @@
##              master       #2684         +/-   ##
===================================================
+ Coverage   57.58494%   57.58972%   +0.00478%     
===================================================
  Files           1239        1239                 
  Lines         418349      418349                 
  Branches       38812       38812                 
===================================================
+ Hits          240906      240926         +20     
+ Misses        172065      172047         -18     
+ Partials        5378        5376          -2
Flag Coverage Δ
#Debug 57.58972% <ø> (+0.00477%) ⬆️
#production 31.30843% <ø> (+0.00782%) ⬆️
#test 98.93347% <ø> (ø) ⬆️

@RussKie
Copy link
Contributor

RussKie commented Jan 13, 2020

Would it be better to have a common abstract base class for all tests? It would certainly be more maintainable.

Yes, though there be dragons - developers often turn base classes into a dependency nightmare.

Its also possible to build something like the AssemblyFixture example ,

This is interesting, thanks for sharing.

We can certainly iterate the ideas going forward.

@RussKie RussKie merged commit fde3805 into dotnet:master Jan 13, 2020
@ghost ghost added this to the 5.0 milestone Jan 13, 2020
@RussKie RussKie removed this from the 5.0 milestone Jan 13, 2020
@RussKie RussKie added the test-enhancement Improvements of test source code label Jan 13, 2020
@hughbe hughbe deleted the Add-ThreadExceptionFixture branch January 13, 2020 08:28
@ghost ghost locked as resolved and limited conversation to collaborators Feb 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants