# Use Test-Controlled Data as the Ground Truth for Web Page Tests

DevFeed: [Use Test-Controlled Data as the Ground Truth for Web Page Tests](<https://devfeed.tech/articles/never-use-the-page-as-the-source-of-truth-28894.md>)

Original publisher: [Read original article](<https://glebbahmutov.com/blog/source-of-truth/>)

Author: Gleb Bahmutov

Published: 2025-10-03T04:00:00Z

Content type: tutorial

Language: en

Sources: [Gleb Bahmutov](<https://devfeed.tech/sources/gleb-bahmutov.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Cypress](<https://devfeed.tech/topics/cypress.md>), [Web](<https://devfeed.tech/topics/web.md>), [Ground truth / benchmark quality](<https://devfeed.tech/topics/ground-truth-benchmark-quality.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [advice](<https://devfeed.tech/tags/advice.md>), [cypress](<https://devfeed.tech/tags/cypress.md>), [data](<https://devfeed.tech/tags/data.md>), [network](<https://devfeed.tech/tags/network.md>), [process](<https://devfeed.tech/tags/process.md>), [source-of-truth](<https://devfeed.tech/tags/source-of-truth.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [web](<https://devfeed.tech/tags/web.md>)

## AI overview

This tutorial explains why tests should not compare two values rendered on a web page as if either value were authoritative. It recommends stubbing the data or network response so the test controls the expected value, while allowing limited duplication when it improves clarity and maintainability.

## Source excerpt

Imagine you are testing a web page showing the purchase receipt.