Blogginlägg

Live Unit Testing i Visual Studio 2017

Av Cecilia Wirén | Blogg | 31 december 2016

Would it be nice to, directly in your code see if it are covered by any tests or even better; if what you just changed, broke any test? This is possible in Visual Studio 2017 Professional. Do you have test projects created in earlier version of Visual Studio? Then you need to update some references first: Enable Live Unit Testing
To start the live testing use the menu Testand choost Start under Live Unit Testing:
The test will run in the background and when it’s done all your code rows will be marked with one out of three symbols:

- This row is associated with at least one failed test.

- Every tests that runs this row is approved.

- This row doesn’t belong to any tests.


If you turn on this feature for a project that are completely without tests, you get a result like this::

Then when you start adding test you will get markings on what rows are approved by tests or not. If you continue to add code, your markings will update for your new code directly:


Till inlägget