diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-11-17 20:58:26 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-11-17 20:58:26 +0000 |
commit | 8e5671a4763542c767a8bdba4b6ea41a2ad7691f (patch) | |
tree | 2bf38d77e7b39dbfe009239e6c13baab54b80238 /Source/UnitTests/README.md | |
parent | c7a2a70a879e2506f6470e0abab2e03b1b60408a (diff) |
Introduce unit tests which use NUnit. NUnit is now a dependency
so developers need to install it via NuGet.
There aren't many tests yet. Just a few for Core and Basetypes but
hopefully more will be added in the future.
More information can be found in Source/UnitTests/README.md
Diffstat (limited to 'Source/UnitTests/README.md')
-rw-r--r-- | Source/UnitTests/README.md | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Source/UnitTests/README.md b/Source/UnitTests/README.md new file mode 100644 index 00000000..5e70bc18 --- /dev/null +++ b/Source/UnitTests/README.md @@ -0,0 +1,55 @@ +Unit testing infrastructure +=========================== + +Boogie uses [NUnit](http://www.nunit.org/) unit test framework. +We currently use NUnit 2.6.3, which was the latest stable +version available at the time of writing. + + +Installing NUnit +================ + +NUnit should be installed via [NuGet](https://www.nuget.org/) package manager. + +The NuGet client is available as + +* An extension to Visual Studio +* An add-in in Monodevelop +* A command line utility from the NuGet website + +Note Mono ships with an old version of NUnit (2.4.8) which will cause +compilation issues. To fix this you must install NUnit via NuGet. + + +Running the tests +================= + +Command line +------------ + +The ``run-unittests.py`` python script in the root directory of the project can be used to run the unit tests on the command line. This script is a simple wrapper for ``nunit-console.exe``. + +``` +$ python run-unittests.py Release +``` + +Run the following to see all the available options + +``` +$ python run-unittests.py --help +``` + +Monodevelop +----------- + +Monodevelop has built in support for running NUnit tests. Goto the "Unit Tests" +panel and click "Run All". + +Visual Studio +------------- + +Visual studio needs the "NUnit Test Adapter for VS2012 and VS2013" add-in to be installed (Tools > Extensions and Updates). Once that is installed you can run unit tests by going + +1. Going to the Test Explorer (TEST > Windows > Test Explorer) +2. Clicking on "Run All" in the Test Explorer. + |