Skip to content

Add support for dotnet test #9496

@jpobst

Description

@jpobst

With #9470, we are now able to support dotnet run in .NET for Android projects. The next logical step would be to support dotnet test.

Ideally, this would probably take the form of a new ".NET for Android Test Project" template. Using this template, a user could write a test such as:

[Test]
public void Round () {
  Assert.AreEqual (3, Java.Lang.Math.Round (3.4));
}

Running dotnet test would:

  • Compile the test project (including generating any needed test infrastructure)
  • Deploy the test project
  • Run the test project
  • Transfer test results from device
  • Display test results to user
  • Output test results to output directory

Note from Discord:

Alexander Köplinger: this should be much easier with the new/upcoming mstest runner infra where the test is not a special project anymore but just a regular "executable"

We could definitely use dotnet test support like this in this repository instead of the custom infrastructure we currently have to run tests on emulators/devices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: App+Library BuildIssues when building Library projects or Application projects.enhancementProposed change to current functionality.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions