Skip to content

Add collector test for every SDK shipped with project templates #686

Description

@MarcoRossignoli

Follow up discussion dotnet/test-templates#78 (comment)

The idea is to move collectors test in a base class and add a property with sdk version and add one class of test for every template sdk released + last preview something like:

public class TestSDK16_2_0 : CollectorsTests
{
      TestSDK16_2_0 ()
      {
          TestSDKVersion = "16.2.0";
      }

      // override with custom assertion if needed for instance for bug https://github.com/microsoft/vstest/pull/2221
}
....
public class TestSDKPreview : CollectorsTests
{
       TestSDKPreview ()
      {
          TestSDKVersion = "16.5.0-preview-20200110-02";
      }

      // override with custom assertion if needed
}

public abstract class CollectorsTests : BaseTest
{
       public string TestSDKVersion {get;set;}

       protected virtual void Assertions()
       {
            ....
       }

       [Fact]
       public void TestXYZ()
       {
             ....
             UpdateTestSDK(SDKVersion);
             ....
       }
}

/cc: @singhsarab @nohwnd @shyamnamboodiripad @AbhitejJohn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementGeneral enhancement request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions