From b725cb8287c962feb0dacbe95c0b6ea417888e9b Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Thu, 17 Sep 2020 18:13:10 -0700 Subject: [PATCH] Switched back to TAEF for UI Tests. Added build task to enable running UI tests in mstest in the future. --- azure-pipelines.yml | 7 +++++++ build/build.cake | 21 +++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cd54edb8644..b82634d7b65 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -59,6 +59,13 @@ jobs: displayName: Publish Test Results condition: always() + - task: PublishPipelineArtifact@1 + displayName: Publish Test WexLogFileOutput + inputs: + targetPath: .\build\WexLogFileOutput + artifactName: WexLogFileOutput + condition: succeededOrFailed() + - task: PowerShell@2 displayName: Authenticode Sign Packages inputs: diff --git a/build/build.cake b/build/build.cake index 0155ea4516b..cad3504f1d6 100644 --- a/build/build.cake +++ b/build/build.cake @@ -35,7 +35,7 @@ var toolsDir = buildDir + "/tools"; var binDir = baseDir + "/bin"; var nupkgDir = binDir + "/nupkg"; -var taefBinDir = baseDir + "/UITests/UITests.Tests.TAEF/bin/Release/netcoreapp2.1"; +var taefBinDir = baseDir + "/UITests/UITests.Tests.TAEF/bin/Release/netcoreapp3.1/win10-x86"; var styler = toolsDir + "/XamlStyler.Console/tools/xstyler.exe"; var stylerFile = baseDir + "/settings.xamlstyler"; @@ -305,7 +305,21 @@ Task("Test") ArgumentCustomization = arg => arg.Append($"-s {baseDir}/.runsettings"), }; DotNetCoreTest(file.FullPath, testSettings); -}).DoesForEach(GetFiles(baseDir + "/**/UITests.*.MSTest.csproj"), (file) => +}).DoesForEach(GetFiles(taefBinDir + "/**/UITests.Tests.TAEF.dll"), (file) => +{ + Information("\nRunning TAEF Interaction Tests"); + + var result = StartProcess(System.IO.Path.GetDirectoryName(file.FullPath) + "/TE.exe", file.FullPath + " /screenCaptureOnError"); + if (result != 0) + { + throw new InvalidOperationException("TAEF Tests failed!"); + } +}).DeferOnError(); + + +Task("MSTestUITest") + .Description("Runs UITests using MSTest") + .DoesForEach(GetFiles(baseDir + "/**/UITests.*.MSTest.csproj"), (file) => { Information("\nRunning UI Interaction Tests"); @@ -317,8 +331,7 @@ Task("Test") Verbosity = DotNetCoreVerbosity.Normal }; DotNetCoreTest(file.FullPath, testSettings); -}).DeferOnError(); - +}); //////////////////////////////////////////////////////////////////////