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

Run unit tests in parallel #4430

Merged
merged 1 commit into from
Jan 22, 2021
Merged
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
13 changes: 6 additions & 7 deletions Build/Cake/unit-tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@ public override void Run(Context context)
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Utilities.dll");
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Urls.dll");

foreach (var file in testAssemblies)
{
context.VSTest(file.FullPath,
FixToolPath(context, new VSTestSettings()
context.VSTest(
testAssemblies,
FixToolPath(
context,
new VSTestSettings
{
Logger = $"trx;LogFileName={file.GetFilename()}.xml",
Logger = "trx",
Parallel = true,
EnableCodeCoverage = true,
FrameworkVersion = VSTestFrameworkVersion.NET45,
TestAdapterPath = @"tools\NUnitTestAdapter.2.3.0\build"
}));
}
}

// https://github.com/cake-build/cake/issues/1522
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ steps:
displayName: 'Publish Test Results **/TestResults/*.xml'
inputs:
testResultsFormat: VSTest
testResultsFiles: '**/TestResults/*.xml'
testResultsFiles: '**/TestResults/*.trx'
mergeTestResults: true
failTaskOnFailedTests: true
condition: eq(variables['RunTests'], 'True')
Expand Down