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

Adds support for the NUnit3 "--agents" option. Useful for test assemb… #272

Merged
merged 1 commit into from Sep 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions Source/MSBuild.Community.Tasks/NUnit3.cs
Expand Up @@ -48,6 +48,7 @@ namespace MSBuild.Community.Tasks
/// <Target Name="NUnit3">
/// <NUnit3 Assemblies="@(TestAssembly)"
/// Process="Multiple"
/// Agents="1"
/// TestTimeout="1000"
/// Framework="v4.0"
/// Force32Bit="true"
Expand Down Expand Up @@ -239,6 +240,19 @@ public string Process
set { _process = value; }
}

private string _agents;

/// <summary>
/// The --agents option controls the number of agents that may be allowed to run simultaneously assuming you are not running inprocess.
/// If not specified, all agent processes run tests at the same time, whatever the number of assemblies.
/// This setting is used to control running your assemblies in parallel.
/// </summary>
public string Agents
{
get { return _agents; }
set { _agents = value; }
}

private string _domain;

/// <summary>
Expand Down Expand Up @@ -407,6 +421,8 @@ protected override string GenerateCommandLineCommands()

builder.AppendSwitchIfNotNull(c+"process=",_process);

builder.AppendSwitchIfNotNull(c+"agents=", _agents);

builder.AppendSwitchIfNotNull(c+"domain=",_domain);

builder.AppendSwitchIfNotNull(c+"apartment=",_apartment);
Expand Down