CustomerTestsExcel 1.0.2
See the version list below for details.
dotnet add package CustomerTestsExcel --version 1.0.2
NuGet\Install-Package CustomerTestsExcel -Version 1.0.2
<PackageReference Include="CustomerTestsExcel" Version="1.0.2" />
paket add CustomerTestsExcel --version 1.0.2
#r "nuget: CustomerTestsExcel, 1.0.2"
// Install CustomerTestsExcel as a Cake Addin #addin nuget:?package=CustomerTestsExcel&version=1.0.2 // Install CustomerTestsExcel as a Cake Tool #tool nuget:?package=CustomerTestsExcel&version=1.0.2
Customer Tests Excel
A framework to round trip NUnit to / from Microsoft Excel customer tests.
Created as a replacment for Fitnesse. RES is primarily a science and engineering company, and due to the calculation heavy nature of the work, none of the existing customer test frameworks are a good fit.
Advantages
- Tests are expressed in Microsoft Excel Spreadsheets, which our customers are familiar with, and which support any complexity of calculation
- Tests are converted to C# / NUnit, and make use of existing tooling (which aids debugging, coverage, Continuous Integration etc)
- Automated refactoring can be done in C#, using existing tooling, and then the changes written back to Excel
- The NUnit tests are generated from Excel, so the two are guaranteed to be in sync
Usage
- Install the Nuget Package
CustomerTestsExcel
- Create an Excel Spreadsheet with a Test (see below for format)
- Run
GenerateCodeFromExcelTest.exe
to create / update the C# test project - For example
GenerateCodeFromExcelTest.exe /folder "SampleTests" /project SampleTests.csproj /namespace SampleTests /usings "SampleSystemUnderTest" /assertionClassPrefix "I"
GenerateCodeFromExcelTest.exe
will be in thetools
folder of the nuget package (for exampleCustomerTestsExcel.1.0.1\tools
)/folder
is the desired folder of the Test project relative to the current working directory/project
is the desired name of the visual studio project- `/namespace' is the desired namespace for the tests
/usings' is space delimited list of namespaces that will be added as
using` statements to the tests/assertionClassPrefix
is added to the Excel assertion type names when creating the C# names.- Open the test project in Visual Studio (For example
SampleTests\SampleTests.csproj
) - Put any custom code under a
IgnoreOnGeneration
folder, so that it will remain when the test project is regenerated. - To create the Excel Spreadsheet from the C# code
- Set a
CUSTOMER_TESTS_EXCEL_WRITE_TO_EXCEL
environment variable totrue
- Set a
CUSTOMER_TESTS_RELATIVE_PATH_TO_EXCELTESTS
environment variable from the Output Folder (for examplebin\debug
) to theExcelTests
folder - Run the tests
- Set a
See the SampleTests and SampleSystemUnderTest projects for examples.
The Excel test for the Rerouting example (SampleTests/ExcelTests/Rerouting.xlsx
) looks like this:
Building Locally
- CustomerTestsExcel.sln
Build Server (private to RES)
End to End testing
The SampleTests project performs both documentation and End to End testing
During the AppVeyor build, the SampleTests Excel spreadsheets are converted in to C# tests, these tests are then run to re-create the spreadsheets, and then the spreadsheets are converted back in to C# again. This ensures that all the conepts contained within the spreadsheets are round trippable.
Deploying
Click "Deploy" on the relevant AppVeyor build if you have access to it.
Otherwise, nuget pack CustomerTestsExcel.csproj -build
in root directory, then push .nupkg to a feed
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- DocumentFormat.OpenXml (>= 2.8.1)
- NUnit (>= 3.5.0)
- System.IO.Abstractions (>= 2.0.0.136)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.