---
title: "Better world by better software"
url: https://daily.dev/posts/better-world-by-better-software-jl6jtjins
source_url: https://glebbahmutov.com/blog/verify-then-control-the-data
type: article
source: "Gleb Bahmutov"
published: 2026-05-31T07:53:42.068Z
updated: 2026-05-31T08:59:44.316Z
tags: ["testing", "cypress"]
reading_time: 4
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Better world by better software

**[Gleb Bahmutov](https://daily.dev/sources/glebbahmutov)** · 4 min read · 0 upvotes · 0 comments

## Summary

Four approaches to testing a web page that fetches server data are compared, progressing from reading DOM values to spying on network calls, stubbing responses, and finally a 'verify then control' pattern. The recommended approach uses schema validation on real server responses before substituting mock data, ensuring tests remain deterministic without duplicating app logic or blindly trusting stubs that may drift from the actual API contract.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://glebbahmutov.com/blog/verify-then-control-the-data>

## Similar posts on daily.dev

- [Can you tell me how to test](https://daily.dev/posts/can-you-tell-me-how-to-test-gmewndth5) · RUBYLAND · 1 upvotes · 0 comments
- [The Faster Way to Scrape: Finding ‘Hidden’ APIs in Modern Websites](https://daily.dev/posts/the-faster-way-to-scrape-finding-hidden-apis-in-modern-websites-2l19qosan) · Ruby Flow · 0 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#cypress](https://daily.dev/tags/cypress)

[View this post on daily.dev](https://daily.dev/posts/better-world-by-better-software-jl6jtjins)
