Skip to content

[templates] Update androidtest to MSTest 4.3.2#12052

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-update-androidtest-mstest
Jul 13, 2026
Merged

[templates] Update androidtest to MSTest 4.3.2#12052
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-update-androidtest-mstest

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Pull Request
title and
description
should follow the
commit-messages.md workflow documentation, and in particular should include:

  • Useful description of why the change is necessary.
  • Links to issues fixed
  • Unit tests

The androidtest template should use the latest stable MSTest release so newly created Android test projects receive current fixes and behavior. Update the template package reference from MSTest 4.2.3 to 4.3.2.

Extend DotNetNewAndroidTest so dotnet test exercises both the stable package from the generated template and the nightly MSTest package used by the repository build. The nightly case continues to rewrite the package version and add the test-tools feed; the stable case leaves the generated project unchanged.

Update the androidtest template to MSTest 4.3.2. Exercise dotnet test with both the stable template dependency and the nightly build dependency.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b7c547f6-a8ce-4e27-b18f-05a24fb1d5e7

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the androidtest project template to use the latest stable MSTest package and expands the device integration coverage so template-generated projects are exercised with both the stable MSTest package and the repository’s nightly MSTest version.

Changes:

  • Bump androidtest template MSTest package reference from 4.2.3 to 4.3.2.
  • Update DotNetNewAndroidTest to optionally rewrite the generated project to the nightly MSTest version and add the test-tools feed only for the nightly case.
  • Adjust test matrix to include stable vs nightly MSTest package channels.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs Adds stable/nightly MSTest channel handling to DotNetNewAndroidTest, including conditional rewrite + restore source.
src/Microsoft.Android.Templates/androidtest/AndroidTest1.csproj Updates template MSTest package version to 4.3.2.

Comment thread tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs
Comment on lines 2489 to +2492
[Test]
[TestCase ("run", AndroidRuntime.CoreCLR)]
[TestCase ("test", AndroidRuntime.CoreCLR)]
public void DotNetNewAndroidTest (string mode, AndroidRuntime runtime)
[TestCase ("run", MSTestPackageChannel.Nightly)]
[TestCase ("test", MSTestPackageChannel.Stable)]
[TestCase ("test", MSTestPackageChannel.Nightly)]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I noticed this, and it seems fine. I don't think a bug would be surfaced from the missing combination.

@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jul 13, 2026
@jonathanpeppers jonathanpeppers merged commit b3282a2 into main Jul 13, 2026
43 checks passed
@jonathanpeppers jonathanpeppers deleted the jonathanpeppers-update-androidtest-mstest branch July 13, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants