Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

# Run tests
- name: Test solution
run: dotnet test --no-build -c ${{matrix.configuration}} -l "console;verbosity=detailed"
Copy link
Member

Choose a reason for hiding this comment

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

Is this because the verbosity is now detailed by default, or something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The whole UX for MTP is different, and there is no -l (logger). I'm not sure what piece of info was originally intended to be looked at with detailed verbosity, maybe @nohwnd might know what VSTest exactly does under each verbosity, but anyways, I guess if there is something you don't like with the new output, we would love to know to add more customizations and/or having better defaults.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If detailed shows passed tests, then --output detailed would be kinda the equivalent here.

run: dotnet test --no-build -c ${{matrix.configuration}} --no-progress

# Pack solution
- name: Pack solution
Expand Down
3 changes: 1 addition & 2 deletions .runsettings
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<RunSettings>
<MSTest>
<MaxCpuCount>0</MaxCpuCount>
<Parallelize>
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need this?

<!-- Run tests in parallel by default -->
<ItemGroup Condition="$(IsTestProject)">
<AssemblyAttribute Include="Microsoft.VisualStudio.TestTools.UnitTesting.ParallelizeAttribute"/>
</ItemGroup>

Or can we remove it in this PR if it's redundant now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. Only one of these are needed, assuming Community.Toolkit.Common.targets is imported for all test projects in the repo.
I would prefer the one in targets and delete the runsettings. Having the assembly attribute provides:

  • More consistent experience.
  • Hint to MSTest analyzer MSTEST0001 that parallelization is enabled, which will otherwise show a by-design false positive.

<Workers>0</Workers>
<Scope>ClassLevel</Scope>
</Parallelize>
</MSTest>
</RunSettings>
</RunSettings>
4 changes: 3 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<PropertyGroup>
<RepositoryDirectory>$(MSBuildThisFileDirectory)</RepositoryDirectory>
<BuildToolsDirectory>$(RepositoryDirectory)build\</BuildToolsDirectory>

<EnableMSTestRunner>true</EnableMSTestRunner>
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment to explain what this is and what it does? Or a link to docs if there's any.

</PropertyGroup>

<Import Project="$(BuildToolsDirectory)Community.Toolkit.Common.props" />
Expand Down Expand Up @@ -44,4 +46,4 @@
</When>
</Choose>

</Project>
</Project>
7 changes: 5 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"sdk": {
"version": "10.0.100",
"version": "10.0.101",
"rollForward": "latestFeature",
"allowPrerelease": false
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
}
Loading