Skip to content

Commit b35490d

Browse files
Add ExcludeFromCodeCoverage attribute to templates (#1854)
* Add ExcludeFromCodeCoverage attribute to templates * Move ExcludeFromCodeCoverage to GlobalSetup.cs and add for Playwright --------- Co-authored-by: Tom Longhurst <30480171+thomhurst@users.noreply.github.com>
1 parent ee04c9b commit b35490d

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Here you could define global logic that would affect all tests
2+
3+
// You can use attributes at the assembly level to apply to all tests in the assembly
4+
[assembly: System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Here you could define global logic that would affect all tests
2+
3+
// You can use attributes at the assembly level to apply to all tests in the assembly
4+
[assembly: System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]

TUnit.Templates/content/TUnit/GlobalSetup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// You can use attributes at the assembly level to apply to all tests in the assembly
44
[assembly: Retry(3)]
5+
[assembly: System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
56

67
namespace TestProject;
78

0 commit comments

Comments
 (0)