Visual Studio as a Dashboard

VS_Dash

I have stepped up my game over the years such that Visual Studio is now my dashboard for the quality metrics of the systems I build.

Specifically, I dock the Test Explorer and Code Coverage window under my Solution Explorer. Thus, every time I build my solution, my unit tests automatically get executed and I am able to observe a red or green bar that reflects test results.

In addition, I have created a shortcut for executing Code Coverage analysis. I often run this report about a dozen times a day so that I can identify dead code as well as gaps within my unit tests.

To create a shortcut for executing Code Coverage, perform the following:

  1. Type Ctrl + Q
  2. Observe the cursor on the QuickSearch searchbox is now set
QuickSearch

3. Type “Shortcuts” in the searchbox

Shortcuts

4. Select the “Environment -> Keyboard” option

5. Observe navigation to: Options | Environment | Keyboard

6. Set a shortcut to CodeCoverage:

CodeCoverage_shortcut

7. Apply the update for the short cut.

8. Within the editor, type: Alt+C, Alt+C

9. Observe test execution and a CodeCoverage report gets generated:

CodeCoverage_window

Conclusion

In conclusion, I have stepped up my game over the years such that Visual Studio is now my dashboard for the quality metrics of the systems I build. Thus, I have shared how to setup Visual Studio to provide the quality metrics when writing code.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: