Sunday, 5 June 2016

Detail analysis of Chutzpah test runner for Test Driven Development in visual studio for Angular applications

In this post we will discuss about some detail analysis of Chutzpah test runner, which will run the unit test case for angular applications.

This is based on the previous post reference

As we see in the previous post we are referencing a some js files in the Test.js file, because mock file specifying the Dependencies, now how the test runner know Jasmine Framework, Where it is specified ? How the Dynamic Html is created while debugging or running the tests.

We already installed the JasmineTest using package manager console, because of this we have a controller, Views, Some Jasmine Js in our project . but it is not actually played role while testing. Now we see it in detail, below is the controller code 

Unit Test Code

Now when we start debug the unit test in visual studio, Chutzpah run a dynamic Html in Browser, when we see the Resources of the Page it is clearly shows that the dependencies are loaded which are mentioned in comment and also some other Jasmine files are also loaded in application, but it loads from AppData instead of from project, so Jasmine is loaded from Global.

see the structure of the Spec test runner for Chutzpah. Sequence of Loading the Scripts for Testing.
You can see the Files which are require to test the file other than the dependencies what we specified it is injected by test runner.


This post may be give the detail analysis of Chutzpah Test Runner for Unit testing the Angular Applications in Visual Studio 

No comments:

Post a Comment