Skip to content

Commit c1f11c5

Browse files
author
Hovsep Mkrtchyan
committed
Adding more details to test failure.
1 parent 91495a5 commit c1f11c5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
using System.Management.Automation;
2828
using System.Security.Cryptography.X509Certificates;
2929
using Microsoft.Azure.ServiceManagemenet.Common;
30+
using System.Text;
3031

3132
namespace Microsoft.WindowsAzure.Commands.ScenarioTest
3233
{
@@ -291,8 +292,15 @@ public virtual Collection<PSObject> RunPowerShellTest(params string[] scripts)
291292

292293
if (powershell.Streams.Error.Count > 0)
293294
{
295+
var sb = new StringBuilder();
296+
foreach (var error in powershell.Streams.Error)
297+
{
298+
sb.AppendLine(error.ErrorDetails.Message);
299+
}
300+
294301
throw new RuntimeException(
295-
"Test failed due to a non-empty error stream, check the error stream in the test log for more details.");
302+
"Test failed due to a non-empty error stream, check the error stream in the test log for more details.\r\n" +
303+
sb.ToString());
296304
}
297305

298306
return output;

0 commit comments

Comments
 (0)