Skip to content

Add CIConditionAttribute #5533

Open
@Youssef1313

Description

@Youssef1313

Summary

Consider adding a CIConditionAttribute (or ContinuousIntegrationConditionAttribute) that handles commonly known CI systems to allow the user to run a test only in CI, or exclude a test only in CI.

Background and Motivation

In some cases, a test could be flaky only in CI and temporarily disabled only in CI. Having this attribute out of the box makes it easier for MSTest users to handle this.

Proposed Feature

public sealed class CIConditionAttribute : ConditionBaseAttribute
{
    public CIConditionAttribute(ConditionMode mode);
}

This should handle GitHub Actions, Azure Pipelines, AppVeyor, Travis, CircleCI, Jenkins, ...

Alternative Designs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions