| Property | Value |
|---|---|
| Package | Philips.CodeAnalysis.MsTestAnalyzers |
| Diagnostic ID | PH2013 |
| Category | MsTest |
| Analyzer | AvoidAttributeAnalyzer |
| CodeFix | No |
| Severity | Error |
| Enabled By Default | Yes |
Tests marked as Ignore are essentially dead code.
Remove the test. Rely on your version control system and issue tracking system to remember it.
Code that triggers a diagnostic:
[TestMethod]
[Ignore]
public void BadTestMethod()
{
Assert.AreEqual(1, 1);
}The following analyzers detect other situations that prevent tests from executing (either unwittingly or nefariously):
| ID | Title |
|---|---|
| PH2034 | Test methods must be in TestClass |
| PH2036 | Test methods must be public |
| PH2038 | Test classes must be public |
| PH2059 | Public methods must be TestMethods |
Microsoft's official MSTest analyzers provide equivalent functionality:
| Microsoft Rule | Description |
|---|---|
| MSTEST0015 | Don't ignore tests |
Consider migrating to Microsoft's official MSTest analyzers which provide equivalent or better functionality with official support.
This analyzer does not offer any special configuration. The general ways of suppressing diagnostics apply.