Code Mahek
  • Blog
  • About
  • Contact
  • Random Clicks
  • Resume
  • Ava Chat Bot

Fragrance
​of Programming

Visual Studio 2017:Live Unit Testing

12/31/2017

Comments

 
"Live" unit testing is nothing but automated execution of unit tests that may have impacted by your code change and it provides the real time results. 
Currently, I am using NCrunch which provides the same mechanism and it really works well. However Microsoft has directly given that capability without using any extension or any other external tools.

Prerequisite
  • You must be using Visual Studio 2017 Enterprise Edition
  • Currently feature is only supported for C# and Visual Basic projects.
  • Currently they are supporting only 3 frameworks i.e MSTest (MSTest.TestFramework 1.05.preview), NUnit (NUnit 3.5.0), xUnit (xUnit 1.9.2).

Configuration
For configuring the Live Testing settings, you need to browse to Tools-->Options and than select "Live Unit Testing".
​
Picture
Real time test case execution is really helpful and if you don't have Visual Studio Enterprise edition than you can still go for NCrunch.

Thanks for reading!!!

​Rishi
Comments

Visual Studio Code: Hiding .js and .map files in a TypeScript project

12/23/2017

Comments

 
Currently I am working in an Angular  project and I am using Visual Studio code as my IDE. Also, I am using TypeScript for JavaScript scripting. While working with TypeScript in Visual Studio Code, you often don’t want to see generated JavaScript files and source maps in the explorer or in search results. And as the project grows it really gets messy and it really becomes very tedious to handle.
Picture
Luckily, there is a way to hide derived Javascript files in VS Code out of the box. Using a filter expression, we can use the files.exclude setting to hide these derived files.

Navigate to: File-->Preferences-->Workspace Settings

Picture
Next in the right pane add the below code:

This will match on any JavaScript file (**/*.js), but only if a sibling TypeScript file with the same name is present. Of course the exclude of *.js.map will hide all appropriate map files. With a result that the file explorer will no longer show derived resources for JavaScript if they are compiled to the same location.
Comments
<<Previous

    RSS Feed

    Categories

    All
    Azure
    C#
    Cloud
    CodeProject
    CSharp
    DotNet Core
    Jetbrains
    .NET
    Rider
    Source Generators
    SQL
    Tech News
    Ubuntu
    Visual Studio 2015
    Visual Studio 2019
    Windows
    Windows 10

    Archives

    May 2020
    February 2019
    January 2019
    December 2018
    May 2018
    December 2017
    November 2017
    October 2017
    September 2017
    July 2017
    May 2017
    April 2017
    May 2015
    April 2015
    March 2015

    View my profile on LinkedIn

Location

Contact Us

    Subscribe Today!

Submit
  • Blog
  • About
  • Contact
  • Random Clicks
  • Resume
  • Ava Chat Bot