Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Testing   (RSS)

All the wonderful colors of code coverage

I'd like to share my colors with you: R G B Coverage Not Touched Area 230 128 165 Coverage Partially Touched Area 191 210 249 Coverage Touched Area 180 228 180 These are the colors I prefer for code coverage in Visual Studio and if you've used the first
Posted by ddietric | 0 Comments
Filed under:

EMTF 2.0 Beta released

It's been a couple of months since I first blogged about EMTF . Since then I've been busy refining and extending the framework and I'm happy to announce that the beta release of version 2.0 is finally done! Special thanks to Josh Poley since a lot of
Posted by ddietric | 1 Comments

Creating an API testing framework 101

Writing a fully featured API testing solution is a lot of work. You have to deal with things like test case management, integration with code coverage tools or test execution on server farms. However, the core of a (reflection-based) API testing framework
Posted by ddietric | 2 Comments
Filed under: ,

Introducing EMTF

A while ago a needed to do what I like to call quick and dirty testing , i.e. getting as much test coverage as possible in a given period of time. To make things worse, I was working on a client-server feature requiring a bit of setup in order to work

The ultimate ExceptionAssert.Throws() method

A while ago I published a post titled Pimp your VSTT exception tests in which I pointed out some disadvantages of VSTT's declarative approach to testing for exceptions and provided an alternative. I recently gave this some more thought while writing some
Posted by ddietric | 0 Comments

It's all about systems - even if you're testing only a component

Earlier this year I bought a brand new computer and wanted to play what turned out to be one of my favorite games of all times. However, it also turned out that this new computer of mine came with a pretty bad graphics card. It did work but the performance
Posted by ddietric | 1 Comments
Filed under: ,

Which Microsoft virtualization solution to use for software testing

I have to admit the title is a bit misleading this time since - if you ask me - there is only one answer: Hyper-V ! It is the first Microsoft virtualization product to support 64-bit guest operating systems, SMP for some guests (see Supported Guest Operating
Posted by ddietric | 1 Comments
Filed under: ,

A poor man's approach to testing with databases

Say you are working on software that accesses a database server and you need to test it. To some extent you'll probably try to not actually hit the database with your tests by using a mock. However, this is not always possible, especially when we're dealing
Posted by ddietric | 0 Comments
Filed under:

Pimp your VSTT exception tests

Writing unit tests in VSTT is great since it comes with a nice unit testing framework and the test tools are neatly integrated into Visual Studio. There is one exception though: Exception testing (yes, that pun was intended). Consider the following example:
Posted by ddietric | 5 Comments

Unit testing non-public types using reflection

Let's say you want to unit test the following class: using System; internal class Foo { internal Foo( object parameter) { if (parameter == null ) throw new ArgumentException (); } internal int ReturnZero() { return 1; } } F irst of all, besides being
Posted by ddietric | 1 Comments
Filed under:

How would you test a... C# code generator with Visual Studio Team Test

Introduction I spent some time this week thinking about how to test a code generator that generates C# code and is itself written in C# (so it's once again all about managed code). At first I thought about how to verify the generator output directly.

Fun with events and delegates

So how can you verify that a given class raises an event? Well, you can simply write some code that registers an event handler and then cause the target to raise that event. Now, how do you verify that a given class does actually handle an event raised

A good reason for calling GC.Collect()

You've probably heard that you should not call GC .Collect() and generally speaking this is absolutely correct. Yes, there are probably exceptions to that rule but unless you know for sure that calling GC .Collect() will improve the runtime behavior of
 
Page view tracker