TestGuard reads tests written in JS/TS, Python, Go, C#, F# and VB.NET, and Gherkin feature files. The table shows, for each check, whether it works fully, partly or not at all in each language, and every limit has a note.
A rule that is not supported for a language emits nothing there, so a missing finding is not a clean result for that rule.
Most C# pull requests are read with our newer, more accurate C# reader. Very large ones (more than about 5.7 MB of C#, counting the old and new version of each edited file) use the classic reader so the scan still finishes quickly.
Checks by language
FullThe check works as described.
LimitedIt works, with the gaps in its numbered note.
Not supportedNoneIt reports nothing for that language.
What each limited or not-supported check misses. Open a language to read its numbered notes; each numbered badge in the table opens its note.
JS/TS
No limits: every check works fully.
Python
3 limits
A test mocks the code it tests (limited): patches in fixtures/conftest are not attributed to a test; SUT is matched by module name = test file stem.
Many snapshots were updated at once (limited): syrupy .ambr files only.
An async test checks nothing after it waits (limited): awaits with no assertion afterwards; unawaited coroutines are not detected.
Go
5 limits
A test mocks the code it tests (not supported): needs type information to know what a test double stands in for.
An exact check was made looser (limited): weak forms recognised only for testify (NotNil, NotEmpty, True on a bare identifier).
Many snapshots were updated at once (not supported): no Go snapshot format recognised.
A test mocks almost everything (limited): testify mock .On receivers only; hand-written fakes are not counted.
An async test checks nothing after it waits (not supported): no async test model.
C#
5 limits, 5 syntax notes
A test mocks the code it tests (limited): Moq, NSubstitute, FakeItEasy, Rhino Mocks, JustMock and AutoFixture mocks and hand-written fakes in the test file; the class under test comes from [TestSubject], a sut/_sut variable, parameter or field, or new X(...) in the test class or its [SetUp]/constructor; when none of these is found, both new X(...) in the test body and the test file name minus a Tests/Test suffix count; a partial mock or subclass fake of the type under test, held in a local variable, is reported when the test calls a member the mock sets up or the fake overrides.
A test or assertion was deleted (limited): removed [InlineData], [InlineAutoData], [TestCase] and [DataRow] rows and entries of a MemberData/TestCaseSource member listed in the same file are counted; rows produced by loops or LINQ at run time, and ClassData/DynamicData sources in files the pull request does not change, are not counted.
Many snapshots were updated at once (limited): Verify *.verified.*, Snapshooter __snapshots__/*.snap and Snapper _snapshots/*.json files only; each file counts as one snapshot; Snapshooter and Snapper files are read only when the pull request also changes a .cs, .fs, .vb or .csproj file.
A test mocks almost everything (limited): Moq, NSubstitute, FakeItEasy, Rhino Mocks, JustMock and AutoFixture mocks, plus hand-written fakes (a class in the test file that implements an interface, or extends a type its name contains).
An async test checks nothing after it waits (limited): async Task tests that await with no assertion afterwards, *Async(...) calls used as a bare statement or _ = discard, and async void tests; a Task stored in a variable is detected when its declared type is Task or ValueTask, or the call ends in Async, and the variable is never used again.
C# syntax TestGuard does not read
What
How TestGuard treats it
Helpers, base classes, partial classes
Custom assertion helpers are followed one level; helpers, base test classes and partial class halves are followed across the changed files TestGuard reads as tests; ones in a file the pull request does not change are not seen. [Ignore] on a base class skips only that class's own tests, as NUnit and MSTest do; it does not skip a derived class's tests.
#if branches
#if branches are evaluated only when every symbol is set by #define/#undef in the file or by a <DefineConstants> outside any Condition in the nearest .csproj the pull request changes; otherwise every branch is read as text.
Assert.Ignore / Inconclusive
Assert.Ignore and Assert.Inconclusive inside an if, loop, lambda or other block are reported as a possible conditional skip, with low severity; the test still counts as active.
Source generators
Files marked auto-generated are skipped; tests that source generators create at build time are not seen.
New vs. classic reader
The C# notes on this page describe the newer reader, which builds a syntax tree of each file with the tree-sitter C# grammar. It is used for every C# pull request under about 5.7 MB of C# (counting the old and the new version of each edited file); a larger pull request is read by the classic reader, so the scan stays within its CPU time budget. The classic reader keeps the earlier limits: code inside interpolated-string { } holes is read as text, partial mocks and subclass fakes are not reported, rows from getter blocks, returned literals, DynamicData, ClassData and TestCaseSource(typeof(X)) are not counted, a Task stored in a variable is not detected, and tests a class inherits from a base class are read in the base class's own file only.
F#
7 limits, 6 syntax notes
A test mocks the code it tests (not supported): mocks are not read in F# tests.
A test or assertion was deleted (limited): [<InlineData>], [<TestCase>] and [<DataRow>] rows are counted; Expecto tests built by code (list comprehensions, functions) are not seen.
An exact check was made looser (limited): Expecto Expect.*, FsUnit should, Assert and FluentAssertions calls; Expect.* arguments are split at spaces and parentheses, so an unparenthesised complex argument can be misread.
Many snapshots were updated at once (limited): Verify *.verified.*, Snapshooter __snapshots__/*.snap and Snapper _snapshots/*.json files only; each file counts as one snapshot; Snapshooter and Snapper files are read only when the pull request also changes a .cs, .fs, .vb or .csproj file.
The CI test gate was weakened (limited): workflow dotnet test and coverlet command lines only; .fsproj files are not read.
A test mocks almost everything (not supported): mocks are not read in F# tests.
An async test checks nothing after it waits (not supported): F# async and task computation expressions are not modelled.
F# syntax TestGuard does not read
What
How TestGuard treats it
Generated Expecto tests
Expecto tests created by code (loops, list comprehensions, functions that call testCase) are not seen.
Focused Expecto tests
Focused Expecto tests (ftestCase, ftest, ftestList) are read as normal tests; that they stop the other tests from running is not reported.
#if branches
#if branches are not evaluated; every branch is read as text.
Custom assertion helpers
Custom assertion helpers are followed one level, within the same file only.
Indentation
A test body ends where its indentation ends; unusual offside layout can be misread.
Assert.Ignore in a block
Assert.Ignore inside an if or other block is not reported as a conditional skip.
VB.NET
6 limits, 5 syntax notes
A test mocks the code it tests (not supported): mocks are not read in VB.NET tests.
A test or assertion was deleted (limited): <InlineData>, <TestCase> and <DataRow> rows are counted; rows from MemberData, TestCaseSource or other code are not.
Many snapshots were updated at once (limited): Verify *.verified.*, Snapshooter __snapshots__/*.snap and Snapper _snapshots/*.json files only; each file counts as one snapshot; Snapshooter and Snapper files are read only when the pull request also changes a .cs, .fs, .vb or .csproj file.
The CI test gate was weakened (limited): workflow dotnet test and coverlet command lines only; .vbproj files are not read.
A test mocks almost everything (not supported): mocks are not read in VB.NET tests.
An async test checks nothing after it waits (limited): Async Function tests that await with no assertion afterwards, *Async(...) calls used as a bare statement and Async Sub tests; a Task stored in a variable and never awaited is not detected.
VB.NET syntax TestGuard does not read
What
How TestGuard treats it
Helpers and partial classes
Custom assertion helpers are followed one level, within the same file only; base classes and Partial classes in other files are not read.
#If branches
#If branches are not evaluated; every branch is read as text.
Assert.Ignore / Inconclusive
Assert.Ignore and Assert.Inconclusive inside an If or other block are not reported as a conditional skip.
XML literals
XML literals are not read; code inside them can be misread.
NUnit [Is] constraints
NUnit constraints are read when written [Is] or Iz; other aliases are not.
Gherkin
9 limits, 5 syntax notes
A test mocks the code it tests (not supported): feature files hold no mocks; step definitions are checked in their own language.
An assertion that can never fail (not supported): feature files hold no assertions; step definitions are checked in their own language.
A test that checks nothing (not supported): feature files hold no assertions; step definitions are checked in their own language.
A test was skipped or turned off (limited): @ignore in any letter case on a Feature, Rule or scenario; an @ignore on an Examples block alone is not read.
An exact check was made looser (not supported): feature files hold no assertions; step definitions are checked in their own language.
Many snapshots were updated at once (not supported): snapshot files are counted whatever the test language; see the other .NET columns.
The CI test gate was weakened (not supported): CI files are checked whatever the test language; see the other .NET columns.
A test mocks almost everything (not supported): feature files hold no mocks; step definitions are checked in their own language.
An async test checks nothing after it waits (not supported): feature files hold no async code.
Gherkin syntax TestGuard does not read
What
How TestGuard treats it
Localized keywords
Only English Gherkin keywords are read; feature files in other languages (# language:) are not.
@ignore under Cucumber
@ignore takes effect under SpecFlow and Reqnroll; plain Cucumber runs the scenario unless your tag filter excludes it, so TestGuard can report a scenario as skipped that Cucumber still runs.
@ignore on Examples
@ignore on an Examples block alone is not read.
Renamed and edited scenarios
A scenario renamed and edited in the same change is reported as removed.
Step definitions
Step definitions are checked as C#, F# or VB.NET test code only when their file matches a test path.