In this episode, I look at how to create a custom task in Visual Studio code to run unit tests with NUnit and dotnet test. I bind that task to a custom keyboard shortcut to provide a quick and easy way to kick off unit tests while writing code.
If you're following along directly, you'll want to install the libraries I show in the demo:
- NUnit
- NUnit Console
- NUnit3TestAdapter
- Microsoft.NET.Test.Sdk
Link to NUnit NuGet page: https://www.nuget.org/packages/NUnit/
See this page for instructions on installing NuGet from the console.
NUnit GitHub repo:
https://github.com/nunit/nunit
Installation guide from the NUnit docs:
https://github.com/nunit/docs/wiki/Installation
If you have any questions or requests for future episodes, leave them in the comments below!
GitHub repo with code from this video:
https://github.com/wesdoyle/5-minute-fridays/tree/master/SampleTests
Download
0 formats
No download links available.
Running Unit Tests in VS Code for .NET Core 2.0 | NatokHD