From dc27031adc7f81a8bd177c890d354c79d3671f32 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 17 Jan 2021 18:36:38 -0600 Subject: Add documentation on how to run tests on a VM. --- README.md | 27 ++++++++++++++++++++-- src/Utilities/TestBA/TestBA.csproj | 1 + .../WixToolsetTest.BurnE2E.csproj | 5 ++++ src/WixToolsetTest.BurnE2E/runtests.cmd | 2 ++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/WixToolsetTest.BurnE2E/runtests.cmd diff --git a/README.md b/README.md index 30003903..431f7b9c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ -# burn-e2e-tests -burn-e2e-tests - End-to-end tests for WiX bundles, building real installers and running them. +# integration + +This repo is for building installers, and then executing xunit tests that run them and verify that they worked. + +## Running tests + +The main focus of these tests is to validate behavior in a real environment. +Depending on who you talk to, these are integration or system-level or end-to-end (E2E) tests. +They modify machine state so it's strongly recommended *not* to run these tests on your dev box. +They should be run on a VM instead, where you can easily roll back. + +1. Run appveyor.cmd to build everything (the tests will refuse to run). +1. Copy the build\Release\netcoreapp3.1 folder to your VM. +1. Open a command prompt and navigate to the netcoreapp3.1 folder. +1. Run the runtests.cmd file to run the tests. + +You can modify the runtests.cmd to run specific tests. +For example, the following line runs only the specified test: + +> dotnet test --filter WixToolsetTest.BurnE2E.BasicFunctionalityTests.CanInstallAndUninstallSimpleBundle WixToolsetTest.BurnE2E.dll + +The VM must have: +1. x64 .NET Core SDK of 5.0 or later (for the test runner) +1. Any version of .NET Framework (for the .NET Framework TestBA) +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 @@ win-x86 true true + Major 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,8 +5,13 @@ netcoreapp3.1 x64 + Major + + + + 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 @@ +SET RuntimeTestsEnabled=true +dotnet test WixToolsetTest.BurnE2E.dll \ No newline at end of file -- cgit v1.2.3-55-g6feb