Unit Testing Test Builders: Less Setup, Better Tests The Test Builder pattern fixes your maintenance tax. It's a simple abstraction that decouples how an object is made from why it's being used.
Exploratory Testing Tips for Unit Testing in Front-End Frameworks: Part 2 In the second installment of "Tips for Unit Testing in Front-end Frameworks," we'll determine our testing prerequisites.
Development Practices Tips for Unit Testing in Front-end Frameworks: Part 1 Learning to effectively test in frameworks like Angular is difficult. Here's a method that helped me write unit tests in front-end frameworks.
Unit Testing Unit Tests: Your Code’s Living, Breathing Specification Learn how unit tests serve as a living specification, enhancing code clarity. Explore Test-Driven Development with real-world examples.
Development Practices 4 Tips for Writing More Testable Code I recently paired with a developer new to automated testing and shared tips I've picked up over the years on how to write more testable code.
React / Redux Tips for Using React Testing Library to Write Unit Tests These are my top tips for anyone using the React Testing Library package for their unit tests. I hope they help you avoid major pain points.
C# Mock a DbContextFactory for Repository Unit Tests in .Net Core In a .Net Core project, if you’re using the DbContextFactory class to create DbContext instances, you may run into problems.
Developer Tools Write Cleaner Unit Tests Using Parameterization Look out for repeated patterns in your unit tests. You might be able to implement some parameterization to make them more succinct.
Exploratory Testing Setting Up (and Tearing Down) Unit Tests for an Entity Framework Core Application Resolve Microsoft.EntityFrameworkCore.DbUpdateException and System.TimeoutException in Entity Framework unit testing.
C# How I Use xUnit’s Theory to Test Switch Statement Expressions Recently for a .NET Core project, I took advantage of xUnit’s Theory annotation so that I could avoid writing a Fact for every case in the switch statement.
Exploratory Testing Set Team Standards for Unit Test Code Coverage in JetBrains Rider While code coverage is not a perfect indicator of a healthy test suite, JetBrains Rider can help identify areas of potential risk in your solution.
Development Practices Use TypeScript Assertion Functions for Legible Test Expectations If you're working with Discriminated Unions, TypeScript's Assertion Functions can help keep your test expectations legible.