From e9ab5d64eaa2b2607753d5d4af4d8aecb604fdc6 Mon Sep 17 00:00:00 2001 From: Philip Wood Date: Tue, 9 May 2017 20:33:21 +0100 Subject: [PATCH] Not sure how I missed the acceptance test xunit update on the last commit. And, improve logging around test coverage. --- build.cake | 6 ++++-- test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.cake b/build.cake index 57460772..eddaffc0 100644 --- a/build.cake +++ b/build.cake @@ -18,6 +18,7 @@ var artifactsForUnitTestsDir = artifactsDir + Directory("UnitTests"); var unitTestAssemblies = @"./test/Ocelot.UnitTests/Ocelot.UnitTests.csproj"; var minCodeCoverage = 75d; var coverallsRepoToken = "coveralls-repo-token-ocelot"; +var coverallsRepo = "https://coveralls.io/github/TomPallister/Ocelot"; // acceptance testing var artifactsForAcceptanceTestsDir = artifactsDir + Directory("AcceptanceTests"); @@ -155,7 +156,7 @@ Task("RunUnitTests") throw new Exception(string.Format("Coveralls repo token not found. Set environment variable '{0}'", coverallsRepoToken)); } - Information("Uploading test coverage to coveralls.io"); + Information(string.Format("Uploading test coverage to {0}", coverallsRepo)); CoverallsNet(coverageSummaryFile, CoverallsNetReportType.OpenCover, new CoverallsNetSettings() { RepoToken = repoToken @@ -173,7 +174,8 @@ Task("RunUnitTests") if(double.Parse(sequenceCoverage) < minCodeCoverage) { - throw new Exception(string.Format("Code coverage fell below the threshold of {0}%", minCodeCoverage)); + var whereToCheck = !AppVeyor.IsRunningOnAppVeyor ? coverallsRepo : artifactsForUnitTestsDir; + throw new Exception(string.Format("Code coverage fell below the threshold of {0}%. You can find the code coverage report at {1}", minCodeCoverage, whereToCheck)); }; } diff --git a/test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj b/test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj index 0cc0f528..4adb231f 100644 --- a/test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj +++ b/test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj @@ -31,7 +31,7 @@ - + @@ -51,7 +51,7 @@ - +