Skip to content

Update dependency MSTest.TestFramework to v3#81

Open
mend-for-github-com[bot] wants to merge 1 commit into
mainfrom
whitesource-remediate/mstest.testframework-3.x
Open

Update dependency MSTest.TestFramework to v3#81
mend-for-github-com[bot] wants to merge 1 commit into
mainfrom
whitesource-remediate/mstest.testframework-3.x

Conversation

@mend-for-github-com

@mend-for-github-com mend-for-github-com Bot commented Dec 7, 2022

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
MSTest.TestFramework 2.2.9 -> 3.6.0 age adoption passing confidence

Release Notes

microsoft/testfx (MSTest.TestFramework)

v3.6.0

See the release notes here

Special shoutout to @​SimonCropp for his exceptional contribution in improving the quality of the repository.

v3.5.2

See the release notes here

v3.5.1

See the release notes here

v3.5.0

See the release notes here

v3.4.3

See the release notes here

v3.4.2: v.3.4.2

See the release notes here

v3.4.1

See the release notes here

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/rel/3.4/samples/public/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 MSTestRunnerWinUI example

And more

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

New Contributors

A special thank you to all our new contributors:

v3.3.1

See the release notes here

v3.3.0

See the release notes here.

v3.2.2

See the release notes here.

v3.2.1

See the release notes here.

v3.1.1

See the release notes here.

v3.0.4

See the release notes here.

v3.0.3

See the release notes here.

v3.0.2

See the release notes here.

v3.0.1

See the release notes here.

v3.0.0

See the release notes here.

v2.2.10

See 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 this update again.


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

@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch 2 times, most recently from 87eca04 to f6314da Compare December 27, 2022 16:01
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from f6314da to 0e13878 Compare May 25, 2023 09:38
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from 0e13878 to a6e7408 Compare June 1, 2023 15:12
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from a6e7408 to 5483134 Compare July 14, 2023 14:12
@mend-for-github-com mend-for-github-com Bot changed the title Update dependency MSTest.TestFramework to v3 Update dependency MSTest.TestFramework to v3 - autoclosed Nov 3, 2023
@mend-for-github-com mend-for-github-com Bot deleted the whitesource-remediate/mstest.testframework-3.x branch November 3, 2023 04:01
@mend-for-github-com mend-for-github-com Bot changed the title Update dependency MSTest.TestFramework to v3 - autoclosed Update dependency MSTest.TestFramework to v3 Nov 4, 2023
@mend-for-github-com mend-for-github-com Bot reopened this Nov 4, 2023
@mend-for-github-com mend-for-github-com Bot restored the whitesource-remediate/mstest.testframework-3.x branch November 4, 2023 03:53
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from 5483134 to 345a43e Compare January 25, 2024 04:49
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from 345a43e to 2f18bae Compare February 14, 2024 03:33
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from 2f18bae to c01360d Compare February 23, 2024 04:09
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch 2 times, most recently from f718ec6 to 85b4168 Compare April 5, 2024 03:56
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch 3 times, most recently from 45c0804 to 0475e93 Compare May 30, 2024 12:53
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from 0475e93 to 25cfa0e Compare May 30, 2024 20:06
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from 25cfa0e to 0450b37 Compare July 17, 2024 04:29
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from 0450b37 to 0fe6b10 Compare August 6, 2024 04:20
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from 0fe6b10 to cbf5337 Compare August 14, 2024 05:18
@mend-for-github-com mend-for-github-com Bot force-pushed the whitesource-remediate/mstest.testframework-3.x branch from cbf5337 to 03cc007 Compare September 13, 2024 03:52
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.

0 participants