Visual Studio: Live Unit Test is awesome
Kenichiro Nakamura
Posted on April 14, 2023
I am okay writing unit test, but there are several things I don't like.
- Keep checking the coverage report
- Test failed after changing so many codes as a regression
Visual Studio Live Unit Testing feature helps me to solve these issues.
As the official document is very easy to read, I won't re-write it here but I just want to take note for several important things.
Prerequisites
- Enterprise edition of Visual Studio
- C# or VB.NET
- Supports xUnit, NUnit and MSTest
What it does?
Basically, the Visual Studio runs existing unit tests background and let me know:
- Which lines are covered by test
- The test results
- Which tests are covering the line
Every time I change the code, it runs automatically and shows me the results.
Caveat
It uses computer power, so recommend not to use it if you see any heavy performance decrease in your PC. Also be careful about the battery life if you work in cafe without AC.
Summary
I turn it on all the time as my PC is powerful enough to run it without any issues so far. Please try if you meet the prerequisites!
Posted on April 14, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.