public void CaseFailed(FailResult result) { if (isParameterized) { var newTask = new TestCaseTask(result.Case.Name, nodeRunner.CurrentTask.AssemblyLocation); server.CreateDynamicElement(newTask); nodeRunner.AddTask(newTask); } var task = nodeRunner.CurrentTask; if (!string.IsNullOrWhiteSpace(result.Output)) server.TaskOutput(task, result.Output, TaskOutputType.STDOUT); if (result.Exceptions != null && result.Exceptions.Any()) { server.TaskException(task, result.Exceptions.Select(ex => new TaskException(ex)).ToArray()); task.CloseTask(TaskResult.Exception, result.Case.Name); } else { task.CloseTask(TaskResult.Error, result.Case.Name); } if (isParameterized) nodeRunner.FinishCurrentTask(task); }
public static string CompoundStackTrace(this FailResult failResult) { using (var writer = new StringWriter()) { WriteCompoundStackTraceTo(failResult, writer); return(writer.ToString()); } }
public void CaseFailed(FailResult result) { failed++; inner.CaseFailed(result); }
public static string PrimaryExceptionTypeName(this FailResult failResult) { return(failResult.Exceptions.First().GetType().FullName); }
public static string PrimaryExceptionMessage(this FailResult failResult) { return(failResult.Exceptions.First().Message); }
public static void WriteCompoundStackTraceTo(this FailResult failResult, TextWriter writer) { writer.WriteCompoundStackTrace(failResult.Exceptions); }