@joebigelow / wix / commits / dc27031a

Add documentation on how to run tests on a VM.

Sean Hall committed Jan 17, 2021 at 18:36 UTC dc27031adc7f81a8bd177c890d354c79d3671f32
4 files changed +33 -2
README.md
+25 -2
@@ -1,2 +1,25 @@
1 -# burn-e2e-tests
2 -burn-e2e-tests - End-to-end tests for WiX bundles, building real installers and running them.
1 +# integration
2 +
3 +This repo is for building installers, and then executing xunit tests that run them and verify that they worked.
4 +
5 +## Running tests
6 +
7 +The main focus of these tests is to validate behavior in a real environment.
8 +Depending on who you talk to, these are integration or system-level or end-to-end (E2E) tests.
9 +They modify machine state so it's strongly recommended *not* to run these tests on your dev box.
10 +They should be run on a VM instead, where you can easily roll back.
11 +
12 +1. Run appveyor.cmd to build everything (the tests will refuse to run).
13 +1. Copy the build\Release\netcoreapp3.1 folder to your VM.
14 +1. Open a command prompt and navigate to the netcoreapp3.1 folder.
15 +1. Run the runtests.cmd file to run the tests.
16 +
17 +You can modify the runtests.cmd to run specific tests.
18 +For example, the following line runs only the specified test:
19 +
20 +> dotnet test --filter WixToolsetTest.BurnE2E.BasicFunctionalityTests.CanInstallAndUninstallSimpleBundle WixToolsetTest.BurnE2E.dll
21 +
22 +The VM must have:
23 +1. x64 .NET Core SDK of 5.0 or later (for the test runner)
24 +1. Any version of .NET Framework (for the .NET Framework TestBA)
25 +1. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA)
\ No newline at end of file
src/Utilities/TestBA/TestBA.csproj
+1
@@ -10,6 +10,7 @@
10 <RuntimeIdentifier>win-x86</RuntimeIdentifier>
11 <EnableDynamicLoading>true</EnableDynamicLoading>
12 <UseWindowsForms>true</UseWindowsForms>
13 + <RollForward>Major</RollForward>
14 </PropertyGroup>
15
16 <ItemGroup Condition=" '$(TargetFramework)'=='net35' ">
src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj
+5
@@ -5,8 +5,13 @@
5 <PropertyGroup>
6 <TargetFramework>netcoreapp3.1</TargetFramework>
7 <PlatformTarget>x64</PlatformTarget>
8 + <RollForward>Major</RollForward>
9 </PropertyGroup>
10
11 + <ItemGroup>
12 + <Content Include="runtests.cmd" CopyToOutputDirectory="PreserveNewest" />
13 + </ItemGroup>
14 +
15 <ItemGroup>
16 <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
17 <PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
src/WixToolsetTest.BurnE2E/runtests.cmd new
+2
@@ -0,0 +1,2 @@
1 +SET RuntimeTestsEnabled=true
2 +dotnet test WixToolsetTest.BurnE2E.dll
\ No newline at end of file