C#/.NET software development, software integrity, life as a freelancer, and all the rest
This is the third part of the three part series that deals with the issue of faking test data in the context of a legacy app that was built with Microsoft's Entity Framework on top of an MS SQL Server database – an architecture that can be found very often, and that originally came up in the broader context of writing User Acceptance Tests. It shows how you could handle such a scenario with the NDbUnit framework.
This is the second part of the three part series that deals with the issue of faking test data in the context of a legacy app that was built with Microsoft's Entity Framework on top of an MS SQL Server database – an architecture that can be found very often, and that originally came up in the broader context of writing User Acceptance Tests. It shows how you could handle such a scenario with the Typemock Isolator tool.
This is the first of a three part series that deals with the issue of faking test data in the context of a legacy app that was built with Microsoft's Entity Framework on top of an MS SQL Server database – a scenario that can be found very often, and that originally came up in the broader context of writing User Acceptance Tests. It describes a sample application, discusses some general aspects of unit testing in a database context, and also some more specific aspects of the here discussed EF/MSS
During the last months, I was doing software development the 'traditional' way (writing code as accurate as you can, then hoping that it's good enough - HDD, Hope-driven development). When I thereafter reviewed my understanding of Test-driven development, it turned out that there are some concepts that I just don't buy anymore...
A presentation about the MSTest framework (aka. Visual Studio Unit Testing), some additional tools (e.g. Moq, Moles, White), how this is supported in Visual Studio, and how it integrates into the broader context of a TFS environment.
These days, JetBrains (the manufacturer of ReSharper (R#)) released the beta version of a new code coverage tool – dotCover. Here are my first impressions about it…
Usual opensource mocking frameworks can mock only interfaces and virtual methods. In contrary to that, Microsoft Moles can ‘mock’ virtually anything. Here's a little overview over this framework, together with a suitable Gallio extension...
This post started out to be a reply to another blog post about some detail of the red/green/refactor cycle in TDD. It ended up as a fairly extensive description of my own personal practice of doing TDD in C#, featuring quite some VS add-ins and discussing some (real-world) aspects of test-driven development along the way...
Sometimes, it seems just too complicated or expensive to test-drive a certain component in an ASP.NET MVC context, or it would require the use of some browser automation framework. To make testing easier in such cases, this post introduces a Gallio/MbUnit test fixture that builds on top of a framework for integration testing ASP.NET MVC applications without the need for any browser or server, but still running in the real (non-mocked) ASP.NET runtime...
Quite a lot of articles and blog posts can be found on the web, that tell you how to write custom rules for MS StyleCop - but almost nothing exists, that deals with the issue of testing such rules. To do something about that, this post presents an easy-to-use Gallio/MbUnit test fixture that makes unit testing of StyleCop rules a breeze...
A developer might occasionally write down some informal piece of text during development. This post shows a method how such ad-hoc produced content can easily be integrated and referenced in a test report...
I am practicing Test Driven Development (TDD) for some time now, and I hardly can imagine writing software another way nowadays, or could even imagine a reason why I should do so. Time to reflect upon my personal reasons for practicing and being so convinced about this technique...
Sometimes, unit testing/test-driving a certain piece of code is very painful and complicated, because the respective component has lots of dependencies. In such a case we usually decide not to unit test the respective component, simply because it wouldn't pay. The route table in an ASP.NET MVC application is such a component. To help with that, this post presents an easy-to-use base class for a test fixture targeting an ASP.NET MVC application's route table...
A few days ago, a new version of Gallio was released, my favorite Test and Automation platform. Although the official version number suggests only a small progression, it actually is a major upgrade that brings a wealth of new features. This is a first look at the two features that attracted me most...
Setting up NHibernate is not one of the easiest tasks, and having to do it for each of your relevant test projects again and again certainly doesn't make it better. So here's a small base class for a test fixture that comes with already pre-configured, ready-to-use NH-support...
In some scenarios, you may have a database that contains text data in a column which is restricted to a certain set of discrete values. In such a case it is a good idea to use an enumeration for representing these data in your domain. This post demonstrates an easy and effective way to put this mapping under test.
Having an enum in code that corresponds to a database table is a common scenario in enterprise application development. - For example you may have an 'OrderStatus' enum in your business logic and a corresponding database table 'ORDERSTATUS' in your database. In such a scenario the enum-table relation might be at risk to go out of sync. This post introduces a simple but useful unit test fixture, that keeps an eye on this for the entire project lifetime...