aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-01-17 18:36:38 -0600
committerSean Hall <r.sean.hall@gmail.com>2021-01-17 18:36:38 -0600
commitdc27031adc7f81a8bd177c890d354c79d3671f32 (patch)
tree5fe54faf4633e322d64dcd6a011b1e3f564f2152
parent02cf98e97df35b3d024d9ade2e80ac348939d29f (diff)
downloadwix-dc27031adc7f81a8bd177c890d354c79d3671f32.tar.gz
wix-dc27031adc7f81a8bd177c890d354c79d3671f32.tar.bz2
wix-dc27031adc7f81a8bd177c890d354c79d3671f32.zip
Add documentation on how to run tests on a VM.
-rw-r--r--README.md27
-rw-r--r--src/Utilities/TestBA/TestBA.csproj1
-rw-r--r--src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj5
-rw-r--r--src/WixToolsetTest.BurnE2E/runtests.cmd2
4 files changed, 33 insertions, 2 deletions
diff --git a/README.md b/README.md
index 30003903..431f7b9c 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,25 @@
1# burn-e2e-tests 1# integration
2burn-e2e-tests - End-to-end tests for WiX bundles, building real installers and running them. 2
3This repo is for building installers, and then executing xunit tests that run them and verify that they worked.
4
5## Running tests
6
7The main focus of these tests is to validate behavior in a real environment.
8Depending on who you talk to, these are integration or system-level or end-to-end (E2E) tests.
9They modify machine state so it's strongly recommended *not* to run these tests on your dev box.
10They should be run on a VM instead, where you can easily roll back.
11
121. Run appveyor.cmd to build everything (the tests will refuse to run).
131. Copy the build\Release\netcoreapp3.1 folder to your VM.
141. Open a command prompt and navigate to the netcoreapp3.1 folder.
151. Run the runtests.cmd file to run the tests.
16
17You can modify the runtests.cmd to run specific tests.
18For example, the following line runs only the specified test:
19
20> dotnet test --filter WixToolsetTest.BurnE2E.BasicFunctionalityTests.CanInstallAndUninstallSimpleBundle WixToolsetTest.BurnE2E.dll
21
22The VM must have:
231. x64 .NET Core SDK of 5.0 or later (for the test runner)
241. Any version of .NET Framework (for the .NET Framework TestBA)
251. x86 .NET Core Desktop Runtime of 5.0 or later (for the .NET Core TestBA) \ No newline at end of file
diff --git a/src/Utilities/TestBA/TestBA.csproj b/src/Utilities/TestBA/TestBA.csproj
index 796a0dfd..610540c4 100644
--- a/src/Utilities/TestBA/TestBA.csproj
+++ b/src/Utilities/TestBA/TestBA.csproj
@@ -10,6 +10,7 @@
10 <RuntimeIdentifier>win-x86</RuntimeIdentifier> 10 <RuntimeIdentifier>win-x86</RuntimeIdentifier>
11 <EnableDynamicLoading>true</EnableDynamicLoading> 11 <EnableDynamicLoading>true</EnableDynamicLoading>
12 <UseWindowsForms>true</UseWindowsForms> 12 <UseWindowsForms>true</UseWindowsForms>
13 <RollForward>Major</RollForward>
13 </PropertyGroup> 14 </PropertyGroup>
14 15
15 <ItemGroup Condition=" '$(TargetFramework)'=='net35' "> 16 <ItemGroup Condition=" '$(TargetFramework)'=='net35' ">
diff --git a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj
index 988834b2..10962dcf 100644
--- a/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj
+++ b/src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj
@@ -5,9 +5,14 @@
5 <PropertyGroup> 5 <PropertyGroup>
6 <TargetFramework>netcoreapp3.1</TargetFramework> 6 <TargetFramework>netcoreapp3.1</TargetFramework>
7 <PlatformTarget>x64</PlatformTarget> 7 <PlatformTarget>x64</PlatformTarget>
8 <RollForward>Major</RollForward>
8 </PropertyGroup> 9 </PropertyGroup>
9 10
10 <ItemGroup> 11 <ItemGroup>
12 <Content Include="runtests.cmd" CopyToOutputDirectory="PreserveNewest" />
13 </ItemGroup>
14
15 <ItemGroup>
11 <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" /> 16 <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
12 <PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" /> 17 <PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
13 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.48" /> 18 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.48" />
diff --git a/src/WixToolsetTest.BurnE2E/runtests.cmd b/src/WixToolsetTest.BurnE2E/runtests.cmd
new file mode 100644
index 00000000..91496593
--- /dev/null
+++ b/src/WixToolsetTest.BurnE2E/runtests.cmd
@@ -0,0 +1,2 @@
1SET RuntimeTestsEnabled=true
2dotnet test WixToolsetTest.BurnE2E.dll \ No newline at end of file