Dennis "D.C." Dietrich

C#, .NET and the Curse of the Resource Fork - A Tester's Tale

Browse by Tags

Tagged Content List
  • Blog Post: D.C. and the Wrapper Factory

    A while ago I wrote about using reflection for testing non-public members . Since then I've been increasingly annoyed by the repetitive nature of that approach. At some point it occurred to me that it should be possible to automate the mundane and boring task of writing the same kind of reflection code...
  • Blog Post: DTACM (D.C.'s Test Automation Coding Manifesto)

    I find myself getting more and more frustrated whenever I see test code that is best described as quick and dirty. Now, sometimes I do acknowledge that the world is not perfect (has never been and will never be) so I realize that the following is really my personal ideal that might not fully work in...
  • Blog Post: 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...
  • Blog Post: 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 the new functionality is based on his feedback. So...
  • Blog Post: 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 is quite simple. This post explains the basics...
  • Blog Post: 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 in the first place and wanted to cover both sides...
  • Blog Post: 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 new tests and noticed that my original version...
  • Blog Post: 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 was so bad that even full screen DVD playback...
  • Blog Post: 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 Systems for a full list) and with Enlightened...
  • Blog Post: 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 with integration/acceptance tests which need...
  • Blog Post: 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: public class Foo { private object...
  • Blog Post: 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...
  • Blog Post: 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. Since the output is C# code - which ultimately...
  • Blog Post: 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 by another class? Basically it’s the same thing...
  • Blog Post: 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 your application you should refrain from making...
Page 1 of 1 (15 items)