Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Fixed #10
Browse files Browse the repository at this point in the history
  • Loading branch information
stevedennis committed Aug 12, 2016
1 parent 0548bc1 commit 02df6f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion NUnitOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public sealed class NUnitOperation : ExecuteOperation
[DisplayName("nunit path")]
[Description("The path to the nunit test runner executable.")]
public string ExePath { get; set; }
[ScriptAlias(nameof(IsNUnit3))]
[DisplayName("Is NUnit v3")]
[Description("When set to true, a different syntax will be used for command-line arguments.")]
public bool IsNUnit3 { get; set; }
[ScriptAlias("Arguments")]
[DisplayName("Additional arguments")]
[Description("Raw command line arguments passed to the nunit test runner.")]
Expand Down Expand Up @@ -76,7 +80,10 @@ public override async Task ExecuteAsync(IOperationExecutionContext context)

this.LogDebug("Output file: " + outputFilePath);

var args = $"\"{testFilePath}\" /xml:\"{outputFilePath}\"";
var args = this.IsNUnit3
? $"\"{testFilePath}\" --result:nunit2 --result:\"{outputFilePath}\""
: $"\"{testFilePath}\" /xml:\"{outputFilePath}\"";

if (!string.IsNullOrEmpty(this.AdditionalArguments))
{
this.LogDebug("Additional arguments: " + this.AdditionalArguments);
Expand Down

0 comments on commit 02df6f3

Please sign in to comment.