Skip to content

NuGet for test projects #885

Open
Open

Description

@vslee

Is your feature request related to a problem? Please describe.

The test projects contain useful things for consumers, such as JoinableTaskTestBase.SimulateUIThread().

Describe the solution you'd like

NuGets which contain the test projects. For example:
https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Relational.Specification.Tests/
https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection.Specification.Tests/
https://www.nuget.org/packages/Microsoft.AspNetCore.Identity.Specification.Tests/

Describe alternatives you've considered

Currently, I fetch the vs-threading source every once in a while and add a project reference in Visual Studio. But a NuGet would be a cleaner solution.

Activity

  1. AArnott commented on Aug 17, 2021

    @AArnott
    Member

    You don't actually want the unit test themselves, but rather you're looking for us to share the helper methods we use within the tests so that you can use them in your tests as well, I believe.

    That's a fine idea. You mention SimulateUIThread as one example. Are there others?

  2. vslee commented on Aug 17, 2021

    @vslee
    Author

    I am only a light user, so SimulateUIThread is the only one I know of. However, if you only include a few select helper methods in the NuGet, then ppl who are looking for others may get confused as to why it's not working. You're right that the unit tests themselves are not needed in the NuGet, but since they will only be referenced by other test projects, a little bit of bloat wouldn't hurt. Thus, it may be easier to just include everything.

  3. AArnott commented on Aug 17, 2021

    @AArnott
    Member

    We're not going to ship our unit tests themselves in nuget packages. I don't know how offering a new test utility package with some helper methods would confuse people as to why it's not working unless they were previously reaching directly into our test projects, which isn't something we support and I hope is quite rare.

    But as it is, this is a low priority relative to our many other deliverables, so I don't think we'll be taking either direction right away.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions