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

Unit tests

Ian Auty edited this page May 11, 2020 · 7 revisions

MMALSharp has a suite of unit tests covering almost all functionality currently available. 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. The published binaries will then be outputted to the bin/Debug/net472/ directory.
  2. Copy the published binaries to a new folder on your Pi - I'll be copying to the directory /home/pi/Source/MMALSharpTests in this tutorial.
  3. Copy xunit.runner.console v2.4.1 over to your Pi. This will be located in your NuGet packages folder.
  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.4.1/tools/net472.
  6. Run mono --debug xunit.console.exe /home/pi/Source/MMALSharpTests/MMALSharp.Tests.dll -parallel none -maxthreads 1 -verbose. Note we have used the parallel flag and maxthreads in order to turn off parallelism, this is because only one instance of MMALSharp can be running at any given time.