Showing posts with label Visual studio Extesnions. Show all posts
Showing posts with label Visual studio Extesnions. Show all posts

Monday, 23 November 2015

Run the Unit testing of Angular Applications in Visual studio 2015 Test Explorer using Chutzpah Test Adapter

In this post we are going to see how to run the test cases in the Visual Studio Test Explorer using Chutzpah Test Adapter.

Before proceeding with this please refer the following link to install the Jasmine and Chutzpah Test Runner in your applications (Visual Studio)   we have to do the following steps before install the chutzpah test adapter for running the applications in chutzpah test runner.

How to install and Configure the Chutzpah test runner in Visual studio


First to do this we have to install the extension of Chutzpah Test Adapter for visual studio. Already i had installed the chutzpah test runner which is used to run the Js for Testing.

Visual Studio :  Tools - > Extensions and Updates    -> Type Chutzpah in search



























we can see in the above image that Test Runner is already installed, after installing the Chutzpah restart the application, Now give a Rebuild or build in the Visual studio then only applications are get updated. Now Go to View -> TestExplorer and click it. You can see Test explorer updated with some tests, now click Run all.

App Code:


 Test Code:



Test Explorer




In the  above images it shows more cases are failed, but we had written the 6 test cases, then why so many cases are listed it is because of _references.js,  this file have the entry of each js, so when test explorer scans this file it haves our test file also so again the Test file is scanned for testing , for that location it will give error for all test cases so remove the Test File js entry from the _reference.js, Now again Give Build in Solution, we can get the updated test cases now.





above image shows the correct test cases , now click Run all , This will run the test cases, Now we have one issue , a Test case is failed, so we are going to see the details in the Details section. Below image have the detail explanation of test case error. That the expected value is wrong is the issue







From this post you can see how to run the test cases in test explorer of Visual studio using the Chutzpah Test Adapter. By this way you can enable the UI for testing the test cases of Angular Applications. In the Later Post we will see how to test the Applications using Karma JS.



Friday, 25 July 2014

Installing the Extension in Visual studio 2013 results in The Extension Manifest in Invalid [Resolved]

In this article we are going to see some problems and there solutions, for example you may had came across a error when installing a extension in Visual studio 2013 like "Extension Manifest is Invalid".




Why this error occur ?
  This is because in your system , you may have various versions of visual studio when double click the extension it target the wrong  version , i.e you may have visual studio 2013 in ur sysetm , later you are installing Visual studio 2010 for some purpose now this causes the porblem.

To solve this problem many of them will re install the visual studio 2013, then it will  work , to avoid this we can do this simple steps.

Steps:

1. Right click the extension and select Open with options.



2. In the above options select more Options to browse
3.Then scroll down to click the Look for another app in this PC to Browse 




4. Go to the Following Vs installation path 
   "{{installtion Drive}}\Program Files(x86)\Microsoft Visual studio 12.0\Common 7\IDE\VSIXinstaller.exe"        to browse for vsix installer.





5.After select this you can see the icon for the Extension will change as like this 


From this article you can solve some problem in the installation of extension in the visual studio 2013.