diff --git a/ContinuousTests/SingleTestRun.cs b/ContinuousTests/SingleTestRun.cs index a43dc2f..9115fdf 100644 --- a/ContinuousTests/SingleTestRun.cs +++ b/ContinuousTests/SingleTestRun.cs @@ -126,10 +126,11 @@ namespace ContinuousTests private void ThrowFailTest() { - var ex = UnpackException(exceptions.First()); - Log(ex.ToString()); - OverviewLog($" > Test failed {FuturesInfo()}: " + ex.Message); - throw ex; + var exs = UnpackExceptions(exceptions); + var exceptionsMessage = GetCombinedExceptionsMessage(exs); + Log(exceptionsMessage); + OverviewLog($" > Test failed {FuturesInfo()}: " + exceptionsMessage); + throw new Exception(exceptionsMessage); } private string FuturesInfo() @@ -152,6 +153,16 @@ namespace ContinuousTests } } + private string GetCombinedExceptionsMessage(Exception[] exceptions) + { + return string.Join(Environment.NewLine, exceptions.Select(ex => ex.ToString())); + } + + private Exception[] UnpackExceptions(List exceptions) + { + return exceptions.Select(UnpackException).ToArray(); + } + private Exception UnpackException(Exception exception) { if (exception is AggregateException a)