Category Archives: testing

AutoFixture — a Node.js Test Fixture Library

Working on a recent project that was on the MEAN stack, I needed to create test data quickly. I reviewed and tested out some of the existing libraries that are out there, but none of them fit my specific style. … Continue reading 

| 6 Comments

Testing Stripe.com WebHooks With Requestb.in

SignalLeaf uses Stripe.com for billing. One of the cool things it does is provide web hooks to get events so that you can have your system do things in response to those events. Examples of events include customer creation, customer … Continue reading 

| 1 Comment

Semantics, Modules And Testing: Why (And How) I Test Internal Components, Not Private Methods

I saw someone tweet about a new-ish JavaScript library called Autooc. recently. I had not heard of it, so I clicked the link to find out more. It looks like an interesting project. I’ll have to look at it further … Continue reading 

| 2 Comments

Test styles and avoiding setup/teardown

Curious about NSpec, Amir Rajan posted a challenge that posited that NSpec can make your tests cleaner. The results are summarized here: https://gist.github.com/amirrajan/6701522 One thing that is in stark contrast with my tests: https://gist.github.com/jbogard/6690905 And the others is that I … Continue reading 

| 3 Comments

Run tests explicitly in xUnit.net

I’ve more or less ditched NUnit as my default automated testing platform in .NET, preferring the more sensible defaults of xUnit.net. Switching wasn’t so bad – it mostly involved moving setup/teardown methods to constructors/Dispose methods. One piece that was missing … Continue reading 

| 11 Comments

Strategies for isolating the database in tests

One of the keys to having maintainable tests are to make sure that tests are isolated and reproducible. For unit tests, this is easy as long as we stay away from global variables, static classes and in general global state. … Continue reading 

| 17 Comments

On Testing “Trivial Code”

I can’t resist jumping on the band-wagon and telling people that they’re wrong, so here goes… :D Mark “Ploeh” Seemann wrote a post on testing trivial code. There have been several responses saying he’s wrong and that you shouldn’t test … Continue reading 

| Comments Off

Are your unit tests still hard to read ? – Should Assertion Library

I created the Should library to fill a gap in the testing ecosystem in the .Net space.  Simply put, I took what I liked about using extension methods to make a more readable set of assertions, but made the library … Continue reading 

| 15 Comments

Own Your Work

This post is mostly here to share a link. Jeremy Miller posted ‘“Code Complete” is a polite fiction, “Done, done, done” is the hard truth‘. Before clicking through I thought I was going to disagree. After reading through, I agree … Continue reading 

| Comments Off

Testing with queries and repositories (a simple example)

Not being much of a fan of the Repository pattern, or better yet, not a fan of applying it as a universal data access strategy, one question that comes up often is “but what about testing”? But the question should … Continue reading 

| 14 Comments