Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dotnet test #9496

Open
jpobst opened this issue Nov 7, 2024 · 0 comments
Open

Add support for dotnet test #9496

jpobst opened this issue Nov 7, 2024 · 0 comments
Labels
Area: App+Library Build Issues when building Library projects or Application projects. enhancement Proposed change to current functionality.
Milestone

Comments

@jpobst
Copy link
Contributor

jpobst commented Nov 7, 2024

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.

@jpobst jpobst added Area: App+Library Build Issues when building Library projects or Application projects. enhancement Proposed change to current functionality. labels Nov 7, 2024
@jpobst jpobst added this to the .NET 10 milestone Nov 7, 2024
@dotnet-policy-service dotnet-policy-service bot added the needs-triage Issues that need to be assigned. label Nov 7, 2024
@jpobst jpobst removed the needs-triage Issues that need to be assigned. label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: App+Library Build Issues when building Library projects or Application projects. enhancement Proposed change to current functionality.
Projects
None yet
Development

No branches or pull requests

1 participant