Skip to content

Conversation

@dsplaisted
Copy link
Member

Add support for passing a -testConfigFile parameter when running tests. This allows individual tests to be skipped without having to modify the test source code. This will be helpful to allow tests to be run on other repos, such as with dotnet/installer#1454.

The test config file looks like this

<Tests>
  <Method Name="Microsoft.NET.Clean.Tests.GivenThatWeWantToCleanAHelloWorldProject.It_can_clean_and_build_without_using_rebuild"
          Skip="true"
          Issue="https://github.com/dotnet/sdk/issues/1234"
          Reason="Reason for skip"/>
</Tests>

The Issue and Reason attributes aren't currently used, they are merely informational to help us keep such a list up-to-date.

@dsplaisted dsplaisted requested a review from a team May 13, 2019 21:31
@wli3
Copy link

wli3 commented May 13, 2019

tests?

return ret;
}

public static List<string> GetXunitArgsFromTestConfig(string testConfigFile)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotnet test is not xunit specific tho

@wli3
Copy link

wli3 commented May 13, 2019

is test config a standard format? could you give me the link to the schema?

@dsplaisted
Copy link
Member Author

@wli3 This is just a format I came up with. It's not part of the product, it lets us specify which of our tests should be skipped, and all of our tests are Xunit. It doesn't apply to dotnet test, it applies when you "run" the test project, or the dotnet tool created from it.

@wli3
Copy link

wli3 commented May 14, 2019

I see, it is only in tests, not the product

@dsplaisted dsplaisted merged commit ea39c6d into dotnet:master May 14, 2019
wli3 pushed a commit that referenced this pull request Feb 7, 2020
* Update dependencies from https://github.com/dotnet/arcade build 20191017.8

- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19517.8

Dependency coherency updates

- Microsoft.NET.Sdk.WindowsDesktop - 5.0.0-alpha1.19462.16 (parent: Microsoft.WindowsDesktop.App)

* Update dependencies from https://github.com/dotnet/arcade build 20191018.2

- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19518.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants