Look out for repeated patterns in your unit tests. You might be able to implement some parameterization to make them more succinct.
Resolve Microsoft.EntityFrameworkCore.DbUpdateException and System.TimeoutException in Entity Framework unit testing.
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.
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.
If you're working with Discriminated Unions, TypeScript's Assertion Functions can help keep your test expectations legible.
Laravel doesn't come with a built-in way to run different types of tests. This post will help you create Artisan commands to easily run all your tests.
When learning a new language, it's important to understand testing frameworks. With Kotlin, it's made easy by its similarity and interoperability with Java.
Good unit tests are often the best documentation of a project's behavior. But poorly-written unit tests can cement code in place, making it more difficult to change.
A short walkthrough of the Mox library for Elixir. See how implementing mocks based on behaviours can simplify your unit tests for Phoenix controllers.
With mocks for dependencies inside functions, unit tests will be resilient to a changing codebase. And functions with mocks can be developed without a chain of dependencies.
Mock objects allow you to mimic the behavior of classes and interfaces, letting the code in the test interact with them as if they were real.
QUnit makes it easy to write custom assertions that improve the legibility of your tests and their reports. Here's how to log an assertion.