Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Unit tests

Ian Auty edited this page Jul 9, 2018 · 7 revisions

MMALSharp has a suite of unit tests covering almost all functionality currently available. We have 176 tests in the suite so far and continue to add to this number each release.

Our unit tests use the xUnit framework and a few preliminary steps must be carried out before running them.

  1. First, grab MMALSharp from source and build the library in Visual Studio.
  2. After building is successful, find the location of your NuGet package restore folder (for Windows users this is usually C:\Users\USERNAME\.nuget\packages) and copy the folder xunit.runner.console over to your Pi.
  3. Copy the contents of the directory tests\MMALSharp.Tests\bin to a new folder on your Pi - I'll be copying to the directory /home/pi/Source/MMALSharpTests in this tutorial.
  4. Open a new console window on your Pi locally, or SSH to your Pi via PuTTY in Windows.
  5. cd to xunit.runner.console/2.2.0/tools.
  6. Run mono --debug xunit.console.exe /home/pi/Source/MMALSharpTests/MMALSharp.Tests.dll -parallel none. Note we have used the parallel flag and told xUnit to turn off parallelism, this is because only one instance of MMALSharp can be running at any given time.
Clone this wiki locally