Testing Routes for Web Api Controllers

In this post I will describe in detail how to perform integration tests on Web Api controllers, including routes and authentication.  I am going to use the same Angular MVC application I used in many of my Angular posts.  In this application I use Structure Map dependency resolution, but the same testing approach will apply …

Continue reading ‘Testing Routes for Web Api Controllers’ »

Testing Controllers in Angular with Jasmine

I blogged a while ago about how to build ad-hoc test page for Angular / ASP.NET MVC Application.  In this post I will try to establish a pattern for testing Angular controllers using TypeScript and Jasmine.  Before you start, you have to use Nuget and bring in jasmine framework. I used version 1.3, as I …

Continue reading ‘Testing Controllers in Angular with Jasmine’ »

Connection Pooling and Integration Tests

On my current project we recently started getting the following error while running integration tests as part of continuous integration build. System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. I tested …

Continue reading ‘Connection Pooling and Integration Tests’ »

Unit Testing Silverlight Applications – UI testing and Test Automation

In my last post I am going to cover the last two topics I set out to address.  The first topic is UI testing.  What unit test frameworks lack sometime is the actually UI testing.  What I mean by that is for example, click on a button, then see what happens.  In case of Silverlight, …

Continue reading ‘Unit Testing Silverlight Applications – UI testing and Test Automation’ »

Unit Testing Silverlight Applications – Mocking

In this post I will explore ability to mock various Silverlight classes in order to enable mocking in your unit tests.  There is a variety of mocking frameworks available, but I will pick one for my testing – Moq.  You can download the framework here,  Once this is done, I need to add some references …

Continue reading ‘Unit Testing Silverlight Applications – Mocking’ »

Unit Testing Silverlight Applications – Asynchronous Testing

In this post I will describe how to create asynchronous unit tests for Silverlight applications.  First of all, I’d like to point out that any communication with a server component in Silverlight must be asynchronous.  Reason being is that if communication was synchronous and the remote service was not responding, browser which host Silverlight application …

Continue reading ‘Unit Testing Silverlight Applications – Asynchronous Testing’ »

Unit Testing Silverlight Applications

I am starting a short series of posts on unit testing of Silverlight applications.  I will be using the following set of technologies.  Microsoft Silverlight Unit testing framework that ships with Silverlight tool kit Moq – mocking framework that supports Silverlight 4 StatLight – unit testing automation framework that will allow for unattended / automated …

Continue reading ‘Unit Testing Silverlight Applications’ »