The fundamentals of unit testing: Setup structure
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
Several eons ago, I wrote a blog post about using the python ddt package. My only criticism was that you had to manually pack/unpack the test case arguments.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
This post is part of a series on unit testing.
I’ve not written about testing for a while, but I still enjoy writing automated tests (I am boring) and trying to coach people on good testing practices (I a...
Hello tests. It’s been a while since I blogged about automated testing, so it’s nice to welcome an old friend back to the fold. I’ve missed you. I’ve recentl...
This post was in response to a post on the fragmental.tw blog (the comments aren’t working for me, so I thought I’d post it here) which I read via Roy Oshero...
I answered a question titled, “What’s the difference between unit, functional, acceptance and integration tests?” on Stackoverflow and thought it’d be useful...
It’s a fairly common occurrence - somebody wants to use NUnit’s data driven testing, but they want to vary either the action under test, or the expectation. ...
When the logic of a test method remains constant but the data varies, data-driven testing is a great tool. It allows you, the test author, to write compact c...
I’ve recently been tinkering with WCF and, as many people already know, writing data transfer objects is a pain in the balls. Nobody likes writing repetitive...
“When should I use Debug.Assert and when should I use exceptions?” - It’s a fairly sensible question to ask, but you’ve got to sift through a lot of articles...
Going from experience and, as illustrated by Misko’s recent presentation, the more dependencies you have on your environment, the less trustworthy and mainta...
One of the things that really slashes the return on investment in testing is unreadable code. “This is pretty obvious”, you say. “What’s the point in a blog ...
Prepare for some flimsy and strange analogies.
There is a bewildering array of types of ‘mock’ object available to a tester. The canonical list of test doubles was probably coined by the venerable Martin ...
One of the things I try to encourage is the careful selection of names. Just as self-documenting code is easier to read, so is a self-documenting test. As I ...
When I started my job as a Software Test Engineer, I had very little knowledge about unit testing. I had a good degree award and a load of acronyms to put on...
Have you ever been in this situation? You have thousands of tests in scores of assemblies. All of the tests pass. However, when you run the test suite a seco...
I was thinking about this the other day, and something struck me (and no, it wasn’t a disgruntled developer). Automated testing is a valuable and widely acce...
If you ever have to test a class that uses a WeakReference, or even just have to use Weak References, be very careful. Numerous strange-looking things can oc...
It’s not uncommon to encounter developers that are wholly resistant to unit/functional/integration testing. Some of them will simply dismiss the idea due to ...