---
title: "The Hardest Part of Writing Tests is Getting Started"
description: "Getting a test suite started is the hardest part of testing, so begin with small, incremental steps."
url: "https://swe.quest/articles/the-hardest-part-of-writing-tests-is-getting-started-1901209c01252103"
canonical: "https://shopify.engineering/the-hardest-part-of-writing-tests-is-getting-started"
source: "Shopify Engineering"
published: "2023-02-02"
difficulty: "medium"
kind: "How-to"
reading_minutes: 9
tags: ["testing"]
---

# The Hardest Part of Writing Tests is Getting Started

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2023-02-02, 9 min read, How-to. Original: [https://shopify.engineering/the-hardest-part-of-writing-tests-is-getting-started](https://shopify.engineering/the-hardest-part-of-writing-tests-is-getting-started)

## Summary

Getting a test suite started is the hardest part of testing, so begin with small, incremental steps. First write a trivial test and confirm it can both pass and fail. Next test isolated functions that have no dependencies. Then use stubs and saved API-response fixtures, scrubbed of sensitive data, to isolate code from external services. Finally, add end-to-end tests: in one ETL project, stubbing the API client and testing against a real database reached over 80% code coverage, and the same approach is recommended for refactoring untested legacy code.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)

## Keywords

TDD, stubs, fixtures, end-to-end testing

## Related posts

- [Achieving Test Reliability for Native E2E Testing: Beyond Fixing Broken Tests](https://swe.quest/articles/achieving-test-reliability-for-native-e2e-testing-beyond-fixing-broken-tests-4213c64569bcb860.md): Docker · 2026-03-13 · Medium · 8 min read · Testing, Mobile, CI/CD, Containers
  Patching flaky native E2E tests one by one failed to improve reliability over more than a year.
- [Database testing with fixtures and seeding](https://swe.quest/articles/database-testing-with-fixtures-and-seeding-c9148078cf139feb.md): Neon · 2024-07-02 · Medium · 9 min read · Testing, Databases, Python, Ruby
  Seeding and fixtures solve different problems when populating databases for testing.
- [Autonomous testing of services at scale](https://swe.quest/articles/autonomous-testing-of-services-at-scale-54aa6a1bfbfb71d4.md): Meta Engineering · 2021-10-20 · Medium · 13 min read · Testing, Microservices, RPC & gRPC, Sandboxing & isolation, Developer productivity
  Meta built an integration testing framework for back-end services that reuses production containerization and routing to spin up ephemeral test environments, with per-service boundaries where requests go to local services, in-process Python mocks, in-memory replicas, production (read-only) or are blocked.
- [Mobile Developer Experience at Slack](https://swe.quest/articles/mobile-developer-experience-at-slack-f2b2b79d74a881fd.md): Slack Engineering · 2022-10-12 · Medium · 14 min read · Developer productivity, Mobile, CI/CD, Testing, Build systems
  A dedicated mobile Developer Experience team grew from 3 to 8 engineers and cut CI feedback time and failure rates by targeting the pain points that surveys, NPS and metrics like time to merge showed hurt developers most. iOS test time fell from about 50 minutes to an average of 9 by moving from Xcodebuild to Bazel with disk caching and bazel-diff, so only affected targets are tested.
- [Lastmile CLI: using a CLI to supercharge exploratory testing](https://swe.quest/articles/lastmile-cli-using-a-cli-to-supercharge-exploratory-testing-24c75aa1d7427f82.md): Lyft Engineering · 2021-09-02 · Easy · 7 min read · Testing, Developer tools, Developer productivity
  Lyft Bikes and Scooters' approach to end-to-end exploratory testing of hardware-dependent flows went through four stages.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
