Debug info for tests, to debug on Azure Devops
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -27,6 +27,7 @@ using System.Collections.Generic;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data.Common;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -83,12 +84,19 @@ namespace Umbraco.Tests.Integration.Testing
|
||||
_testTeardown = null;
|
||||
FirstTestInFixture = false;
|
||||
FirstTestInSession = false;
|
||||
|
||||
_stopWatch.Stop();
|
||||
TestContext.Progress.WriteLine($" {_stopWatch.Elapsed}");
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
public virtual void Setup()
|
||||
{
|
||||
TestContext.Progress.Write($"Start test {_testCount++}: ");
|
||||
_stopWatch = new Stopwatch();
|
||||
_stopWatch.Start();
|
||||
var hostBuilder = CreateHostBuilder();
|
||||
|
||||
var host = hostBuilder.StartAsync().GetAwaiter().GetResult();
|
||||
Services = host.Services;
|
||||
var app = new ApplicationBuilder(host.Services);
|
||||
@@ -490,5 +498,7 @@ namespace Umbraco.Tests.Integration.Testing
|
||||
protected static bool FirstTestInSession = true;
|
||||
|
||||
protected bool FirstTestInFixture = true;
|
||||
private Stopwatch _stopWatch;
|
||||
private static int _testCount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user