Category Archives: Testing

Clean Tests: Isolating the Database

Other posts in this series: A Primer Building Test Types Isolating Internal State Isolating the Database Isolating the database can be pretty difficult to do, but I’ve settled on a general approach that allows me to ensure my tests are … Continue reading 

| 5 Comments

Reliable database tests with Respawn

Creating reliable tests that exercise the database can be a tricky beast to tame. There are many different sub-par strategies for doing so, and most of the documented methods talk about resetting the database at teardown, either using rolled back … Continue reading 

| 21 Comments

Clean Tests: Isolating Internal State

Other posts in this series: A Primer Building Test Types Isolating Internal State Isolating the Database One of the more difficult problems with slow tests that touch shared resources is building a clean starting point. In order for tests to … Continue reading 

| 3 Comments

Clean Tests: A Primer

Posts in this series: A Primer Building Test Types Isolating Internal State Isolating the Database Over the course of my career, I’ve an opportunity to work with a number of long lived codebases. Ones that I’ve been a part of … Continue reading 

| 10 Comments

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 

| Leave a comment

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 

| 19 Comments