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!

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay