DEV Community

Kenichiro Nakamura
Kenichiro Nakamura

Posted on

Visual Studio: Live Unit Test is awesome

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.

Live Unit Testing

Detail

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!

Top comments (0)