Skip to content

Commit

Permalink
Switched back to TAEF for UI Tests. Added build task to enable runnin…
Browse files Browse the repository at this point in the history
…g UI tests in mstest in the future.
  • Loading branch information
azchohfi committed Sep 18, 2020
1 parent 666d354 commit b725cb8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
7 changes: 7 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
21 changes: 17 additions & 4 deletions build/build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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");
Expand All @@ -317,8 +331,7 @@ Task("Test")
Verbosity = DotNetCoreVerbosity.Normal
};
DotNetCoreTest(file.FullPath, testSettings);
}).DeferOnError();

});


//////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit b725cb8

Please sign in to comment.