Run Tests After Build – Automatically Running Unit Test After Build Success in Visual Studio

By | June 12, 2015

Visual Studio Test Explorer is an extremely useful tool  to run, monitor, categorized, filter and manage the unit Test (Exploring and Managing Unit Tests Using Test Explorer in Visual Studio ) . While you can view and run the unit test from test explorer manually, Visual studio also enable feature like run the unit test automatically once the local build success. This is quite useful once we generally fix / change logic, and want to ensure the changes does not break any existing code. With this feature enabled, on build success Visual Studio execute all the test cases automatically.

There are two options to enable this feature. From the main menu, navigate to Test –> Test Settings  and select  “Run Tests After Build”

image

 

Must Read :

How to write your very first Unit Test in Visual Studio using MSTest Framework easily ?

Exploring and Managing Unit Tests Using Test Explorer in Visual Studio

You can also enable the same by selecting  “Run Test After Build”  [ image ] button from the Test Explorer.

image

 

When this option is selected, Visual Studio will execute the test methods automatically once build success.

Hope this help.

2 thoughts on “Run Tests After Build – Automatically Running Unit Test After Build Success in Visual Studio

  1. Pingback: Dew Drop – June 12, 2015 (#2034) | Morning Dew

  2. Pingback: Static Code Analysis - The Daily Six Pack: June 17, 2015

Comments are closed.