Skip to content

Commit

Permalink
Initiate work for conditional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Jan 20, 2025
1 parent 8cec650 commit 6ba47dd
Show file tree
Hide file tree
Showing 16 changed files with 202 additions and 94 deletions.
6 changes: 2 additions & 4 deletions src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,7 @@ internal void ExecuteClassCleanup(TestContext testContext)
{
if (classCleanupMethod is not null)
{
if (ClassAttribute.IgnoreMessage is null &&
!ReflectHelper.Instance.IsNonDerivedAttributeDefined<IgnoreAttribute>(classCleanupMethod.DeclaringType!, false))
if (!AttributeHelpers.IsIgnored(classCleanupMethod.DeclaringType!, out _))
{
ClassCleanupException = InvokeCleanupMethod(classCleanupMethod, remainingCleanupCount: BaseClassCleanupMethods.Count, testContext);
}
Expand All @@ -641,8 +640,7 @@ internal void ExecuteClassCleanup(TestContext testContext)
for (int i = 0; i < BaseClassCleanupMethods.Count; i++)
{
classCleanupMethod = BaseClassCleanupMethods[i];
if (ClassAttribute.IgnoreMessage is null &&
!ReflectHelper.Instance.IsNonDerivedAttributeDefined<IgnoreAttribute>(classCleanupMethod.DeclaringType!, false))
if (!AttributeHelpers.IsIgnored(classCleanupMethod.DeclaringType!, out _))
{
ClassCleanupException = InvokeCleanupMethod(classCleanupMethod, remainingCleanupCount: BaseClassCleanupMethods.Count - 1 - i, testContext);
if (ClassCleanupException is not null)
Expand Down
32 changes: 7 additions & 25 deletions src/Adapter/MSTest.TestAdapter/Execution/UnitTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ private static void RunAssemblyCleanupIfNeeded(ITestContext testContext, ClassCl
/// <param name="testMethodInfo">The testMethodInfo.</param>
/// <param name="notRunnableResult">The results to return if the test method is not runnable.</param>
/// <returns>whether the given testMethod is runnable.</returns>
private bool IsTestMethodRunnable(
private static bool IsTestMethodRunnable(
TestMethod testMethod,
TestMethodInfo? testMethodInfo,
[NotNullWhen(false)] out TestResult[]? notRunnableResult)
Expand Down Expand Up @@ -381,34 +381,16 @@ private bool IsTestMethodRunnable(
}
}

// TODO: Executor should never be null. Is it incorrectly annotated?
string? ignoreMessage = testMethodInfo.Parent.ClassAttribute.IgnoreMessage ?? testMethodInfo.TestMethodOptions.Executor?.IgnoreMessage;
if (ignoreMessage is not null)
{
notRunnableResult =
[
new TestResult()
{
Outcome = UTF.UnitTestOutcome.Ignored,
IgnoreReason = ignoreMessage,
}
];
return false;
}

IgnoreAttribute? ignoreAttributeOnClass =
_reflectHelper.GetFirstNonDerivedAttributeOrDefault<IgnoreAttribute>(testMethodInfo.Parent.ClassType, inherit: false);
ignoreMessage = ignoreAttributeOnClass?.IgnoreMessage;

IgnoreAttribute? ignoreAttributeOnMethod =
_reflectHelper.GetFirstNonDerivedAttributeOrDefault<IgnoreAttribute>(testMethodInfo.TestMethod, inherit: false);
bool shouldIgnoreClass = AttributeHelpers.IsIgnored(testMethodInfo.Parent.ClassType, out string? ignoreMessageOnClass);
bool shouldIgnoreMethod = AttributeHelpers.IsIgnored(testMethodInfo.TestMethod, out string? ignoreMessageOnMethod);

if (StringEx.IsNullOrEmpty(ignoreMessage) && ignoreAttributeOnMethod is not null)
string? ignoreMessage = ignoreMessageOnClass;
if (StringEx.IsNullOrEmpty(ignoreMessage) && shouldIgnoreMethod)
{
ignoreMessage = ignoreAttributeOnMethod.IgnoreMessage;
ignoreMessage = ignoreMessageOnMethod;
}

if (ignoreAttributeOnClass is not null || ignoreAttributeOnMethod is not null)
if (shouldIgnoreClass || shouldIgnoreMethod)
{
notRunnableResult =
[
Expand Down
29 changes: 29 additions & 0 deletions src/Adapter/MSTest.TestAdapter/Helpers/AttributeHelpers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Helpers;

internal static class AttributeHelpers
{
public static bool IsIgnored(ICustomAttributeProvider type, out string? ignoreMessage)
{
IEnumerable<ConditionalTestBaseAttribute> attributes = ReflectHelper.Instance.GetDerivedAttributes<ConditionalTestBaseAttribute>(type, inherit: false);
foreach (ConditionalTestBaseAttribute attribute in attributes)
{
if (attribute.ShouldIgnore)
{
ignoreMessage = attribute.ConditionalIgnoreMessage;
return true;
}
}

ignoreMessage = null;
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Rule ID | Category | Severity | Notes
MSTEST0038 | Usage | Warning | AvoidAssertAreSameWithValueTypesAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0038)
MSTEST0039 | Usage | Info | UseNewerAssertThrowsAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0039)
MSTEST0040 | Usage | Warning | AvoidUsingAssertsInAsyncVoidContextAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0040)
MSTEST0041 | Usage | Warning | UseConditionalTestBaseWithTestClassAnalyzer, [Documentation](https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0041)
1 change: 1 addition & 0 deletions src/Analyzers/MSTest.Analyzers/Helpers/DiagnosticIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ internal static class DiagnosticIds
public const string AvoidAssertAreSameWithValueTypesRuleId = "MSTEST0038";
public const string UseNewerAssertThrowsRuleId = "MSTEST0039";
public const string AvoidUsingAssertsInAsyncVoidContextRuleId = "MSTEST0040";
public const string UseConditionalTestBaseWithTestClassRuleId = "MSTEST0041";
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ internal static class WellKnownTypeNames
public const string MicrosoftVisualStudioTestToolsUnitTestingClassCleanupExecutionAttribute = "Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupExecutionAttribute";
public const string MicrosoftVisualStudioTestToolsUnitTestingClassInitializeAttribute = "Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute";
public const string MicrosoftVisualStudioTestToolsUnitTestingCollectionAssert = "Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert";
public const string MicrosoftVisualStudioTestToolsUnitTestingConditionalTestBaseAttribute = "Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute";
public const string MicrosoftVisualStudioTestToolsUnitTestingCssIterationAttribute = "Microsoft.VisualStudio.TestTools.UnitTesting.CssIterationAttribute";
public const string MicrosoftVisualStudioTestToolsUnitTestingCssProjectStructureAttribute = "Microsoft.VisualStudio.TestTools.UnitTesting.CssProjectStructureAttribute";
public const string MicrosoftVisualStudioTestToolsUnitTestingDataRowAttribute = "Microsoft.VisualStudio.TestTools.UnitTesting.DataRowAttribute";
Expand Down
4 changes: 4 additions & 0 deletions src/Analyzers/MSTest.Analyzers/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ MSTest.Analyzers.AvoidAssertAreSameWithValueTypesAnalyzer
MSTest.Analyzers.AvoidAssertAreSameWithValueTypesAnalyzer.AvoidAssertAreSameWithValueTypesAnalyzer() -> void
MSTest.Analyzers.AvoidUsingAssertsInAsyncVoidContextAnalyzer
MSTest.Analyzers.AvoidUsingAssertsInAsyncVoidContextAnalyzer.AvoidUsingAssertsInAsyncVoidContextAnalyzer() -> void
MSTest.Analyzers.UseConditionalTestBaseWithTestClassAnalyzer
MSTest.Analyzers.UseConditionalTestBaseWithTestClassAnalyzer.UseConditionalTestBaseWithTestClassAnalyzer() -> void
override MSTest.Analyzers.AvoidAssertAreSameWithValueTypesAnalyzer.Initialize(Microsoft.CodeAnalysis.Diagnostics.AnalysisContext! context) -> void
override MSTest.Analyzers.AvoidAssertAreSameWithValueTypesAnalyzer.SupportedDiagnostics.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.DiagnosticDescriptor!>
override MSTest.Analyzers.AvoidUsingAssertsInAsyncVoidContextAnalyzer.Initialize(Microsoft.CodeAnalysis.Diagnostics.AnalysisContext! context) -> void
override MSTest.Analyzers.AvoidUsingAssertsInAsyncVoidContextAnalyzer.SupportedDiagnostics.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.DiagnosticDescriptor!>
override MSTest.Analyzers.UseConditionalTestBaseWithTestClassAnalyzer.Initialize(Microsoft.CodeAnalysis.Diagnostics.AnalysisContext! context) -> void
override MSTest.Analyzers.UseConditionalTestBaseWithTestClassAnalyzer.SupportedDiagnostics.get -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.DiagnosticDescriptor!>
24 changes: 21 additions & 3 deletions src/Analyzers/MSTest.Analyzers/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/Analyzers/MSTest.Analyzers/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -567,4 +567,10 @@ The type declaring these methods should also respect the following rules:
<data name="AvoidUsingAssertsInAsyncVoidContextDescription" xml:space="preserve">
<value>Do not assert inside 'async void' methods, local functions, or lambdas. Exceptions that are thrown in this context will be unhandled exceptions. When using VSTest under .NET Framework, they will be silently swallowed. When using Microsoft.Testing.Platform or VSTest under modern .NET, they may crash the process.</value>
</data>
</root>
<data name="UseConditionalTestBaseWithTestClassTitle" xml:space="preserve">
<value>Use 'ConditionalTestBaseAttribute' on test classes</value>
</data>
<data name="UseConditionalTestBaseWithTestClassMessageFormat" xml:space="preserve">
<value>The attribute '{0}' which derives from 'ConditionalTestBaseAttribute' should be used only on classes marked with `TestClassAttribute`</value>
</data>
</root>
27 changes: 24 additions & 3 deletions src/Analyzers/MSTest.Analyzers/UseAttributeOnTestMethodAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ public sealed class UseAttributeOnTestMethodAnalyzer : DiagnosticAnalyzer
DiagnosticSeverity.Info,
isEnabledByDefault: true);

private const string ConditionalTestBaseAttributeShortName = "ConditionalTestBaseAttribute";
internal static readonly DiagnosticDescriptor ConditionalTestBaseRule = DiagnosticDescriptorHelper.Create(
DiagnosticIds.UseAttributeOnTestMethodRuleId,
title: new LocalizableResourceString(
nameof(Resources.UseAttributeOnTestMethodAnalyzerTitle), Resources.ResourceManager, typeof(Resources), ConditionalTestBaseAttributeShortName),
messageFormat: new LocalizableResourceString(
nameof(Resources.UseAttributeOnTestMethodAnalyzerMessageFormat), Resources.ResourceManager, typeof(Resources), ConditionalTestBaseAttributeShortName),
description: null,
Category.Usage,
DiagnosticSeverity.Info,
isEnabledByDefault: true);

// IMPORTANT: Remember to add any new rule to the rule tuple.
private static readonly List<(string AttributeFullyQualifiedName, DiagnosticDescriptor Rule)> RuleTuples =
[
Expand All @@ -124,11 +136,20 @@ public sealed class UseAttributeOnTestMethodAnalyzer : DiagnosticAnalyzer
(WellKnownTypeNames.MicrosoftVisualStudioTestToolsUnitTestingDescriptionAttribute, DescriptionRule),
(WellKnownTypeNames.MicrosoftVisualStudioTestToolsUnitTestingExpectedExceptionBaseAttribute, ExpectedExceptionRule),
(WellKnownTypeNames.MicrosoftVisualStudioTestToolsUnitTestingCssIterationAttribute, CssIterationRule),
(WellKnownTypeNames.MicrosoftVisualStudioTestToolsUnitTestingCssProjectStructureAttribute, CssProjectStructureRule)
(WellKnownTypeNames.MicrosoftVisualStudioTestToolsUnitTestingCssProjectStructureAttribute, CssProjectStructureRule),
(WellKnownTypeNames.MicrosoftVisualStudioTestToolsUnitTestingConditionalTestBaseAttribute, ConditionalTestBaseRule),
];

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
= ImmutableArray.Create(OwnerRule);
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
ImmutableArray.Create(
OwnerRule,
PriorityRule,
TestPropertyRule,
WorkItemRule,
DescriptionRule,
ExpectedExceptionRule,
CssIterationRule,
CssProjectStructureRule);

public override void Initialize(AnalysisContext context)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Immutable;

using Analyzer.Utilities.Extensions;

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;

using MSTest.Analyzers.Helpers;

namespace MSTest.Analyzers;

/// <summary>
/// MSTEST0041: <inheritdoc cref="Resources.UseConditionalTestBaseWithTestClassTitle"/>.
/// </summary>
[DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)]
public sealed class UseConditionalTestBaseWithTestClassAnalyzer : DiagnosticAnalyzer
{
private static readonly LocalizableResourceString Title = new(nameof(Resources.UseConditionalTestBaseWithTestClassTitle), Resources.ResourceManager, typeof(Resources));
private static readonly LocalizableResourceString MessageFormat = new(nameof(Resources.UseConditionalTestBaseWithTestClassMessageFormat), Resources.ResourceManager, typeof(Resources));

internal static readonly DiagnosticDescriptor UseConditionalTestBaseWithTestClassRule = DiagnosticDescriptorHelper.Create(
DiagnosticIds.UseConditionalTestBaseWithTestClassRuleId,
Title,
MessageFormat,
null,
Category.Usage,
DiagnosticSeverity.Warning,
isEnabledByDefault: true);

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
= ImmutableArray.Create(UseConditionalTestBaseWithTestClassRule);

public override void Initialize(AnalysisContext context)
{
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
context.EnableConcurrentExecution();

context.RegisterCompilationStartAction(context =>
{
if (context.Compilation.TryGetOrCreateTypeByMetadataName(WellKnownTypeNames.MicrosoftVisualStudioTestToolsUnitTestingTestClassAttribute, out INamedTypeSymbol? testClassAttributeSymbol) &&
context.Compilation.TryGetOrCreateTypeByMetadataName(WellKnownTypeNames.MicrosoftVisualStudioTestToolsUnitTestingConditionalTestBaseAttribute, out INamedTypeSymbol? conditionalTestBaseAttributeSymbol))
{
context.RegisterSymbolAction(
context => AnalyzeSymbol(context, testClassAttributeSymbol, conditionalTestBaseAttributeSymbol),
SymbolKind.NamedType);
}
});
}

private static void AnalyzeSymbol(SymbolAnalysisContext context, INamedTypeSymbol testClassAttributeSymbol, INamedTypeSymbol conditionalTestBaseAttributeSymbol)
{
INamedTypeSymbol? conditionalTestBaseAttribute = null;
bool isTestClass = false;
foreach (AttributeData attribute in context.Symbol.GetAttributes())
{
if (attribute.AttributeClass.Inherits(testClassAttributeSymbol))
{
isTestClass = true;
}
else if (attribute.AttributeClass.Inherits(conditionalTestBaseAttributeSymbol))
{
conditionalTestBaseAttribute = attribute.AttributeClass;
}
}

if (conditionalTestBaseAttribute is not null && !isTestClass)
{
context.ReportDiagnostic(context.Symbol.CreateDiagnostic(UseConditionalTestBaseWithTestClassRule, conditionalTestBaseAttribute.Name));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
/// This attribute is used to ignore a test class or a test method, based on a condition and using an optional message.
/// </summary>
/// <remarks>
/// This attribute isn't inherited. Applying it to a base class will not cause derived classes to be ignored.
/// </remarks>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false)]
public abstract class ConditionalTestBaseAttribute : Attribute

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ConditionalTestBaseAttribute() -> void' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Debug)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ConditionalTestBaseAttribute() -> void' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ConditionalTestBaseAttribute() -> void' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build Linux Release)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ConditionalTestBaseAttribute() -> void' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 13 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L13

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(13,23): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ConditionalTestBaseAttribute() -> void' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
{
/// <summary>
/// Gets the ignore message (in case <see cref="ShouldIgnore"/> returns <see langword="true"/>) indicating
/// the reason for ignoring the test method or test class.
/// </summary>
public abstract string? ConditionalIgnoreMessage { get; }

Check failure on line 19 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L19

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(19,56): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'abstract Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ConditionalIgnoreMessage.get -> string?' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 19 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L19

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(19,56): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'abstract Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ConditionalIgnoreMessage.get -> string?' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 19 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L19

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(19,56): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'abstract Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ConditionalIgnoreMessage.get -> string?' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

/// <summary>
/// Gets a value indicating whether the test method or test class should be ignored.
/// </summary>
public abstract bool ShouldIgnore { get; }

Check failure on line 24 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Debug)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L24

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(24,41): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'abstract Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ShouldIgnore.get -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)

Check failure on line 24 in src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs

View check run for this annotation

Azure Pipelines / microsoft.testfx (Build MacOS Release)

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs#L24

src/TestFramework/TestFramework/Attributes/TestMethod/ConditionalTestBaseAttribute.cs(24,41): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'abstract Microsoft.VisualStudio.TestTools.UnitTesting.ConditionalTestBaseAttribute.ShouldIgnore.get -> bool' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
}
Loading

0 comments on commit 6ba47dd

Please sign in to comment.