An Approach to Database Testing in .NET Core 2.1

I’ve been working on a REST API written in ASP.NET Core 2.1. Recently, our team wanted to write tests that exercised our business logic and also interacted with our database. I wasn’t able to find many examples of this online, so I was motivated to write this post and share our approach. Read more on An Approach to Database Testing in .NET Core 2.1…

Testing in Elixir with Multiple Environments

About a year ago, I was learning how to properly unit test Phoenix applications using the Mox library. The strategy I adopted for my side projects involves adding “module dependencies” to any module I want to unit test, and then using Mox to configure those dependencies during the tests.

While that approach is great for preserving good unit test hygiene, such as using explicit intra-module contracts, it isn’t always the simplest. One major hurdle I’ve encountered since writing that post is figuring out how to use both unit and integration tests in a sane way. Read more on Testing in Elixir with Multiple Environments…

Simulate Network Outages in Your App with Little Snitch

Modern development tools are super-convenient. XCode’s more recent builds let you debug an iOS app over WiFi, so you don’t have to succumb to the indignity of plugging in a Lightning cable (so 2017). React Native’s tooling goes a step farther, giving you the ability to run the native part of the app on a mobile device and execute the JavaScript side part of the app in a web browser on your development machine (where the JS inspection tools are more convenient). Networked debugging is amazing.

But sometimes, you need to test your app’s response to network outages. Read more on Simulate Network Outages in Your App with Little Snitch…

A Simple Approach to Comparing Database Structures

On my current project, we are developing a replacement for a legacy system written in Visual FoxPro that our customer has used for the last couple of decades. Since there is a lot of risk in switching over, we have developed a bi-directional syncing tool that attempts to keep each system up-to-date with changes made in the other. Read more on A Simple Approach to Comparing Database Structures…

An Introduction to Property-Based Testing with JavaScript

Property-based testing is a powerful technique that’s been widely and successfully applied to functional-style codebases for a long time. As functional programming continues to get more and more popular among JavaScript developers, the value of this style of testing is becoming more obvious to a wider audience. Read more on An Introduction to Property-Based Testing with JavaScript…

Using State Tables for Testing

Tests can benefit a project in many different ways. For example, they help ensure that the software behaves as expected. They also help document that functionality for pieces of code that other developers may have to maintain.

Lately, I’ve been using state tables in my tests to improve both of these benefits. State tables allow for clear and comprehensive tests that are scalable during the development. Read more on Using State Tables for Testing…