Added UITests to build pipeline

This commit is contained in:
Alexandre Zollinger Chohfi 2020-09-10 16:52:54 -07:00
Родитель 4b977759be
Коммит 4a5402cbcb
7 изменённых файлов: 42 добавлений и 35 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -228,3 +228,6 @@ msbuild.binlog
# Generated file from .ttinclude
**/Generated/TypeInfo.g.cs
# TAEF Log output
WexLogFileOutput

Просмотреть файл

@ -28,6 +28,8 @@
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
</PropertyGroup>
<Target Name="Pack">
</Target>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
@ -163,7 +165,7 @@
<Version>6.2.10</Version>
</PackageReference>
<PackageReference Include="MUXAppTestHelpers">
<Version>0.0.2</Version>
<Version>0.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MUXTestInfra.MSTest" Version="0.0.2" />
<PackageReference Include="MUXTestInfra.MSTest" Version="0.0.3" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />

Просмотреть файл

@ -33,7 +33,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MUXTestInfra.TAEF" Version="0.0.2" />
<PackageReference Include="MUXTestInfra.TAEF" Version="0.0.3" />
<PackageReference Include="TAEF.Redist.Wlk" Version="10.31.180822002" GeneratePathProperty="true" />
<PackageReference Include="runtime.win-x86.microsoft.netcore.app" Version="2.1.0" GeneratePathProperty="true" />
</ItemGroup>

Просмотреть файл

@ -139,6 +139,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UITests.Tests.MSTest", "UIT
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UITests.Tests.TAEF", "UITests\UITests.Tests.TAEF\UITests.Tests.TAEF.csproj", "{C8182EF0-77FB-4B43-A588-C71748A309C7}"
ProjectSection(ProjectDependencies) = postProject
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0} = {05C83067-FA46-45E2-BEC4-EDEE84AD18D0}
EndProjectSection
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "UITests.Tests.Shared", "UITests\UITests.Tests.Shared\UITests.Tests.Shared.shproj", "{1D8B0260-5C17-41DA-9C38-1E37441B3925}"
EndProject
@ -787,7 +790,6 @@ Global
{A5E98964-45B1-442D-A07A-298A3221D81E}.Debug|x86.ActiveCfg = Debug|Win32
{A5E98964-45B1-442D-A07A-298A3221D81E}.Debug|x86.Build.0 = Debug|Win32
{A5E98964-45B1-442D-A07A-298A3221D81E}.Native|Any CPU.ActiveCfg = Release|Win32
{A5E98964-45B1-442D-A07A-298A3221D81E}.Native|Any CPU.Build.0 = Release|Win32
{A5E98964-45B1-442D-A07A-298A3221D81E}.Native|ARM.ActiveCfg = Release|ARM
{A5E98964-45B1-442D-A07A-298A3221D81E}.Native|ARM.Build.0 = Release|ARM
{A5E98964-45B1-442D-A07A-298A3221D81E}.Native|ARM64.ActiveCfg = Release|ARM64
@ -1157,21 +1159,12 @@ Global
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Debug|x86.Build.0 = Debug|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Debug|x86.Deploy.0 = Debug|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|Any CPU.ActiveCfg = Release|x64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|Any CPU.Build.0 = Release|x64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|Any CPU.Deploy.0 = Release|x64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|ARM.ActiveCfg = Release|ARM
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|ARM.Build.0 = Release|ARM
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|ARM.Deploy.0 = Release|ARM
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|ARM64.ActiveCfg = Release|ARM64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|ARM64.Build.0 = Release|ARM64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|ARM64.Deploy.0 = Release|ARM64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|x64.ActiveCfg = Release|x64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|x64.Build.0 = Release|x64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|x64.Deploy.0 = Release|x64
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|x86.ActiveCfg = Release|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|x86.Build.0 = Release|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Native|x86.Deploy.0 = Release|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Release|Any CPU.ActiveCfg = Release|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Release|Any CPU.Build.0 = Release|x86
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Release|ARM.ActiveCfg = Release|ARM
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Release|ARM.Build.0 = Release|ARM
{05C83067-FA46-45E2-BEC4-EDEE84AD18D0}.Release|ARM.Deploy.0 = Release|ARM
@ -1195,15 +1188,10 @@ Global
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Debug|x86.ActiveCfg = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Debug|x86.Build.0 = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|Any CPU.ActiveCfg = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|Any CPU.Build.0 = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|ARM.ActiveCfg = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|ARM.Build.0 = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|ARM64.ActiveCfg = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|ARM64.Build.0 = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|x64.ActiveCfg = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|x64.Build.0 = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|x86.ActiveCfg = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Native|x86.Build.0 = Debug|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Release|Any CPU.Build.0 = Release|Any CPU
{5F720475-E263-4A5A-8C88-2B805B45B5BC}.Release|ARM.ActiveCfg = Release|Any CPU
@ -1225,15 +1213,10 @@ Global
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Debug|x86.ActiveCfg = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Debug|x86.Build.0 = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|Any CPU.ActiveCfg = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|Any CPU.Build.0 = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|ARM.ActiveCfg = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|ARM.Build.0 = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|ARM64.ActiveCfg = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|ARM64.Build.0 = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|x64.ActiveCfg = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|x64.Build.0 = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|x86.ActiveCfg = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Native|x86.Build.0 = Debug|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Release|Any CPU.Build.0 = Release|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Release|ARM.ActiveCfg = Release|Any CPU

Просмотреть файл

@ -54,6 +54,13 @@ steps:
displayName: Publish Test Results
condition: succeededOrFailed()
- task: PublishPipelineArtifact@1
displayName: Publish Test WexLogFileOutput
inputs:
targetPath: .\build\WexLogFileOutput
artifactName: WexLogFileOutput
condition: succeededOrFailed()
- task: PowerShell@2
displayName: Authenticode Sign Packages
inputs:

Просмотреть файл

@ -35,6 +35,8 @@ var toolsDir = buildDir + "/tools";
var binDir = baseDir + "/bin";
var nupkgDir = binDir + "/nupkg";
var taefBinDir = baseDir + "/UITests/UITests.Tests.TAEF/bin/Release/netcoreapp2.1";
var styler = toolsDir + "/XamlStyler.Console/tools/xstyler.exe";
var stylerFile = baseDir + "/settings.xamlstyler";
@ -277,21 +279,23 @@ Task("Test")
.Description("Runs all Tests")
.Does(() =>
{
var vswhere = VSWhereLatest(new VSWhereLatestSettings
{
IncludePrerelease = false
});
Information("\nRunning Unit Tests");
var vswhere = VSWhereLatest(new VSWhereLatestSettings
{
IncludePrerelease = false
});
var testSettings = new VSTestSettings
{
ToolPath = vswhere + "/Common7/IDE/CommonExtensions/Microsoft/TestWindow/vstest.console.exe",
TestAdapterPath = getMSTestAdapterPath(),
var testSettings = new VSTestSettings
{
ToolPath = vswhere + "/Common7/IDE/CommonExtensions/Microsoft/TestWindow/vstest.console.exe",
TestAdapterPath = getMSTestAdapterPath(),
ArgumentCustomization = arg => arg.Append("/logger:trx;LogFileName=VsTestResultsUwp.trx /framework:FrameworkUap10"),
};
};
VSTest(baseDir + "/**/Release/**/UnitTests.*.appxrecipe", testSettings);
VSTest(baseDir + "/**/Release/**/UnitTests.*.appxrecipe", testSettings);
}).DoesForEach(GetFiles(baseDir + "/**/UnitTests.*.NetCore.csproj"), (file) =>
{
Information("\nRunning NetCore Unit Tests");
var testSettings = new DotNetCoreTestSettings
{
Configuration = "Release",
@ -301,6 +305,14 @@ Task("Test")
ArgumentCustomization = arg => arg.Append($"-s {baseDir}/.runsettings"),
};
DotNetCoreTest(file.FullPath, testSettings);
}).Does(() =>
{
Information("\nRunning TAEF Interaction Tests");
var result = StartProcess(taefBinDir + "/TE.exe", taefBinDir + "/UITests.Tests.TAEF.dll /screenCaptureOnError");
if (result != 0)
{
throw new InvalidOperationException("TAEF Tests failed!");
}
}).DeferOnError();