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

chore(deps): update mstest monorepo to v3.4.0 #1119

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 16, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
MSTest.TestAdapter 3.2.2 -> 3.4.0 age adoption passing confidence
MSTest.TestFramework 3.2.2 -> 3.4.0 age adoption passing confidence

Release Notes

microsoft/testfx (MSTest.TestAdapter)

v3.4.0

Here are the highlights of the current release, full change log is available below:

MSTest
New and improved analyzers

We've added more code analyzers to help you prevent mistakes, and to ensure a consistent code style of your tests.

One example of a new analyzer that was added in 3.4.0 is MSTEST0024: Do not store TestContext in static members. This analyzer has info severity by default, and will show a message, when you store TestContext in a static member in your class. This is not recommended, and you should be using a TestContext property instead:

image

The other analyzers added in this release:

If you've just learned about MSTest analyzers, please also check out the analyzers that were added in previous releases. They will help you ensure that your test classes and test methods are recognized by MSTest and are not accidentally ignored.

The analyzers are automatically installed with the MSTest NuGet meta-package. But can also be installed separately using the MSTest.Analyzers NuGet package.

More timeout options

Timeout can now be specified on all fixture methods, including ClassCleanup, AssemblyCleanup, TestCleanup and TestInitalize. In this case I want my [ClassCleanup] to time out after 1 second:

image

Alternatively timeouts can be specified through runsettings. For example like this:

<RunSettings>
  <MSTest>
    <ClassCleanupTimeout>1000</ClassCleanupTimeout>
  </MSTest>
</RunSettings>
Better errors on data mismatch

When you provide data that don't match your test method signature, the test will fail with an informative message, rather than just "Parameter count mismatch.".

image

image

(There is also an analyzer that helps with the same while you are writing the code.)

MSTest SDK updates

We've introduced MSTest project SDK in this .NET Blog post.

Choosing version in global.json

In this release we are promoting a way to define the MSTest.Sdk version in global.json. This makes it easier to specify the version in a single place, instead of in every project.

{
    "msbuild-sdks": {
        "MSTest.Sdk": "3.4.0"
    }
}
<Project Sdk="MSTest.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>
</Project>
Playwright support

We've added a property to enable Playwright, to simplify creating web tests:

<Project Sdk="MSTest.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>

    <EnablePlaywright>true</EnablePlaywright>
  </PropertyGroup>
</Project>
Aspire testing support

Similarly we've added a property to enable Aspire testing:

<Project Sdk="MSTest.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>

    <EnabledAspireTesting>true</EnabledAspireTesting>
  </PropertyGroup>
</Project>
Central package management

NuGet central package management can now be used together with MSTest.Sdk.

More examples of SDK projects

To see more examples of projects using MSTest.Sdk:
https://github.com/microsoft/testfx/tree/main/samples/DemoMSTestSdk

MSTest runner
Simpler banner

We've took inspiration from MSBuild and simplified the runner banner, to show the information, on a single line:

.NET Testing Platform v1.2.0+3abae95b6 (UTC 2024/05/03) [win-x64 - .NET 8.0.4]
STA support and WinUI support

The runner can be configured to run in STA (Single Thread Apartment) mode, which is required for running UI tests. And it also supports WinUI workloads.

See the examples here: samples/mstest-runner/MSTestRunnerWinUI

And more

And much more, see the complete change log here: https://github.com/microsoft/testfx/blob/main/docs/Changelog.md#3.4.0

v3.3.1

See the release notes here

v3.3.0

See the release notes here.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner May 16, 2024 16:12
@renovate renovate bot requested a review from FernandoRojo May 16, 2024 16:12
Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.1%. Comparing base (3b5dac6) to head (cdc3635).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1119   +/-   ##
=====================================
  Coverage   76.1%   76.1%           
=====================================
  Files        255     255           
  Lines      11306   11306           
  Branches    1135    1135           
=====================================
  Hits        8614    8614           
  Misses      2357    2357           
  Partials     335     335           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot force-pushed the renovate/mstest-monorepo branch from 2dfbb6f to a9dabf6 Compare May 23, 2024 10:46
@renovate renovate bot changed the title chore(deps): update mstest monorepo to v3.3.1 chore(deps): update mstest monorepo to v3.4.0 May 23, 2024
Copy link

github-actions bot commented May 23, 2024

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

@renovate renovate bot force-pushed the renovate/mstest-monorepo branch from a9dabf6 to 6e7fce9 Compare May 23, 2024 16:16
@renovate renovate bot force-pushed the renovate/mstest-monorepo branch from 6e7fce9 to cdc3635 Compare May 23, 2024 16:31
@cobya cobya merged commit 7841ed7 into main May 23, 2024
24 of 25 checks passed
@cobya cobya deleted the renovate/mstest-monorepo branch May 23, 2024 17:23
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.

None yet

2 participants