diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-01-17 18:36:38 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-01-17 18:36:38 -0600 |
commit | dc27031adc7f81a8bd177c890d354c79d3671f32 (patch) | |
tree | 5fe54faf4633e322d64dcd6a011b1e3f564f2152 | |
parent | 02cf98e97df35b3d024d9ade2e80ac348939d29f (diff) | |
download | wix-dc27031adc7f81a8bd177c890d354c79d3671f32.tar.gz wix-dc27031adc7f81a8bd177c890d354c79d3671f32.tar.bz2 wix-dc27031adc7f81a8bd177c890d354c79d3671f32.zip |
Add documentation on how to run tests on a VM.
-rw-r--r-- | README.md | 27 | ||||
-rw-r--r-- | src/Utilities/TestBA/TestBA.csproj | 1 | ||||
-rw-r--r-- | src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj | 5 | ||||
-rw-r--r-- | src/WixToolsetTest.BurnE2E/runtests.cmd | 2 |
4 files changed, 33 insertions, 2 deletions
@@ -1,2 +1,25 @@ | |||
1 | # burn-e2e-tests | 1 | # integration |
2 | burn-e2e-tests - End-to-end tests for WiX bundles, building real installers and running them. | 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 | ||
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 @@ | |||
1 | SET RuntimeTestsEnabled=true | ||
2 | dotnet test WixToolsetTest.BurnE2E.dll \ No newline at end of file | ||