mokacoding

unit and acceptance testing, automation, productivity

Posts tagged "tdd"

How to convince your team to adopt TDD

Test-Driven Development is an excellent way of writing code but many people push back against it. To convince your team to adopt it, lead by example. Don't preach. Let the quality of the code your wrote with TDD talk for itself and only suggest TDD when people ask about it.

A real-world example of TDD catching bugs

I published a YouTube video with a tutorial on implementing the FizzBuzz algorithm using Test-Driven Development. While recording, I made a couple of thinking or coding mistakes, and, sure enough, the tests immediately pointed them out.

How to write unit tests for SwiftUI apps

To test SwiftUI applications, don't test SwiftUI code. The SwiftUI framework doesn't lend itself to writing unit tests so don't try to shoehorn views in your test harness. Instead, split layout declaration form content generation logic.

Test-Driven Development in Swift is now available

My book, Test-Driven Development in Swift, is now available in online bookstores everywhere. You'll learn Test-Driven Development writing a real-world SwiftUI application, including events-flow management with Combine, networking, local storage, and third-party libraries.

Boring Iterations. Interesting Steps.

Camille Fournier encourages us to "Make Boring Plans" and move in small iterations.

How to improve your Test-Driven Development workflow by asking "Do I need this yet?"

The "You Don't Need It Yet" technique to ship software on a schedule results in fast real-world feeback. The same mindset can be applied with Test-Driven Development to move between the Red, Green, and Refactor stages faster.

How to TDD in Swift, a step by step guide

With test driven development you can write high quality software in small shippable steps. Here's how to get started.

Red, green, and don't forget refactor

Test driven development works at its best when you refactor as you go. Write the failing test, write just enough code to make it pass, then and only then focus on making that code good.

If you're not writing tests first you're missing out

A look at the benefits of writing unit tests before production code, in other words TDD.

Enhancing XCTest test cases with Nimble matchers

Nimble is a matchers framework built for Swift that provides powerful and versatile expectations. Writing test within the standard XCTest harness but using Nimble assertions is easier and productive, and a good combination of tools to introduce testing and TDD to colleagues and teams in a frictionless way.