<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testing Fundamentals on MinimumCD Practice Guide</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/</link><description>Recent content in Testing Fundamentals on MinimumCD Practice Guide</description><generator>Hugo</generator><language>en</language><atom:link href="https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/index.xml" rel="self" type="application/rss+xml"/><item><title>Test Architecture</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/test-architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/test-architecture/</guid><description>&lt;p&gt;A test architecture that lets your &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#pipeline"&gt;pipeline&lt;/a&gt; deploy confidently, regardless of external system availability, is a core &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#cd-continuous-delivery"&gt;CD&lt;/a&gt; capability. The &lt;a href="https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/test-types/"&gt;Test Types&lt;/a&gt; pages cover each type in depth.&lt;/p&gt;&#10;&lt;p&gt;A CD pipeline&amp;rsquo;s job is to force every &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#artifact"&gt;artifact&lt;/a&gt; to prove it is worthy of delivery. That proof only works when &lt;strong&gt;test changes ship with the code they validate.&lt;/strong&gt; If a developer adds a feature but the corresponding tests arrive in a later commit, the pipeline approved an artifact it never actually verified. That is not a CD pipeline. It is a &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#ci-continuous-integration"&gt;CI&lt;/a&gt; pipeline with a deploy step. Tests and production code must always travel together through the pipeline as a single unit of change.&lt;/p&gt;</description></item><item><title>What to Test - and What Not To</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/what-to-test/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/what-to-test/</guid><description>&lt;p&gt;Three principles determine what belongs in your test suite and what does not.&lt;/p&gt;&#10;&lt;h2 id="if-you-cannot-fix-it-do-not-test-for-it"&gt;If you cannot fix it, do not test for it&lt;/h2&gt;&#10;&lt;p&gt;You should never test the behavior of&#10;services you consume. Testing their behavior is the responsibility of the team that builds&#10;them. If their service returns incorrect data, you cannot fix that, so testing for it is&#10;waste.&lt;/p&gt;&#10;&lt;p&gt;What you &lt;strong&gt;should&lt;/strong&gt; test is how your system responds when a consumed service is unstable or&#10;unavailable. Can you degrade gracefully? Do you return a meaningful error? Do you retry&#10;appropriately? These are behaviors you own and can fix, so they belong in your test suite.&lt;/p&gt;</description></item><item><title>Pipeline Test Strategy</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/pipeline-test-strategy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/pipeline-test-strategy/</guid><description>&lt;p&gt;&lt;strong&gt;Everything that blocks deployment must be deterministic and under your control.&lt;/strong&gt; Everything&#10;that involves external systems runs asynchronously or post-deployment. This gives you the&#10;independence to deploy any time, regardless of the state of the world around you.&lt;/p&gt;&#10;&lt;h2 id="tests-inside-the-pipeline"&gt;Tests Inside the Pipeline&lt;/h2&gt;&#10;&lt;p&gt;These tests run on every commit and &lt;strong&gt;block deployment if they fail&lt;/strong&gt;. They must be fast,&#10;deterministic, and free of &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#external-dependency"&gt;external dependencies&lt;/a&gt;.&lt;/p&gt;&#10;&lt;figure&gt;&lt;img src="https://beyond.minimumcd.org/images/pipeline-tests-inside.svg"&#10;&#9;&#9;&#9;alt="Tests inside the pipeline: pre-merge stage runs static analysis, unit tests, contract tests, and component tests in under 10 minutes. Post-merge re-runs the full deterministic suite. Systems the team does not control are replaced by test doubles."&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;Every test in this &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#pipeline"&gt;pipeline&lt;/a&gt; uses &lt;a href="https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/glossary/#test-double"&gt;test doubles&lt;/a&gt; for&#10;anything that crosses the component boundary into a system the team does not control: third-party&#10;APIs, downstream services owned by other teams, message brokers. No in-band test calls a shared&#10;or external service. A real engine the team owns and isolates per test - a database in a per-test&#10;testcontainer, for example - is permitted in-band because it stays deterministic. This means:&lt;/p&gt;</description></item><item><title>Getting Started</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/getting-started/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/getting-started/</guid><description>&lt;h2 id="starting-without-full-coverage"&gt;Starting Without Full Coverage&lt;/h2&gt;&#10;&lt;p&gt;Teams often delay adopting &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#ci-continuous-integration"&gt;CI&lt;/a&gt; because their existing code lacks tests. This is backwards. You do&#10;not need tests for existing code to begin. You need one rule applied without exception:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;Every new change gets a test. We will not go lower than the current level of code coverage.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Record your current coverage percentage as a baseline. Configure CI to fail if coverage drops&#10;below that number. This does not mean the baseline is good enough. It means the trend only moves&#10;in one direction. Every bug fix, every new feature, and every refactoring adds tests. Over time,&#10;coverage grows organically in the areas that matter most: the code that is actively changing.&lt;/p&gt;</description></item><item><title>Defect Feedback Loop</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/defect-feedback-loop/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/defect-feedback-loop/</guid><description>&lt;p&gt;Treat every test failure as diagnostic data about where your process breaks down, not just as&#10;something to fix. When you identify the systemic source of defects, you can prevent entire&#10;categories from recurring.&lt;/p&gt;&#10;&lt;p&gt;Two questions sharpen this thinking:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;What is the earliest point we can detect this defect?&lt;/strong&gt; The later a defect is found, the&#10;more expensive it is to fix. A requirements defect caught during example mapping costs&#10;minutes. The same defect caught in production costs days of incident response, &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#rollback"&gt;rollback&lt;/a&gt;,&#10;and rework.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Can AI help us detect it earlier?&lt;/strong&gt; AI-assisted tools can now surface defects at stages&#10;where only human review was previously possible, shifting detection left without adding&#10;manual effort.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="trace-every-defect-to-its-origin"&gt;Trace Every Defect to Its Origin&lt;/h2&gt;&#10;&lt;p&gt;When a test catches a defect (or worse, when a defect escapes to production) ask: &lt;strong&gt;where was&#10;this defect introduced, and what would have prevented it from being created?&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Test Feedback Speed</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/feedback-speed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/feedback-speed/</guid><description>&lt;h2 id="why-speed-has-a-threshold"&gt;Why speed has a threshold&lt;/h2&gt;&#10;&lt;p&gt;The 10-minute &lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#ci-continuous-integration"&gt;CI&lt;/a&gt; target and the preference for sub-second unit tests are not arbitrary. They are&#10;long-standing conventions in CD practice, and they align with how human cognition handles&#10;interrupted work. When a developer makes a change and waits for&#10;test results, three things determine whether that feedback is useful: whether the developer still&#10;holds the mental model of the change, whether they can act on the result immediately, and whether&#10;the wait is short enough that they do not context-switch to something else.&lt;/p&gt;</description></item><item><title>Testing Antipatterns</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/antipatterns/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/antipatterns/</guid><description>&lt;p&gt;Most teams arrive at this section with a test suite that doesn&amp;rsquo;t match the &lt;a href="https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/applied-testing-strategies/"&gt;Applied Testing Strategies&lt;/a&gt; guide. This page covers the failure modes that show up most often and the migration moves that get a suite back on track.&lt;/p&gt;&#10;&lt;h2 id="common-testing-anti-patterns"&gt;Common testing anti-patterns&lt;/h2&gt;&#10;&lt;p&gt;Each entry below is a smell that the suite is testing the wrong thing, will erode trust over time, or will block refactoring instead of enabling it.&lt;/p&gt;&#10;&lt;h3 id="reflection-to-reach-private-members"&gt;Reflection to reach private members&lt;/h3&gt;&#10;&lt;p&gt;Using reflection (or language-equivalent escape hatches: &lt;code&gt;@VisibleForTesting&lt;/code&gt;-only public access, friend classes, &lt;code&gt;internal&lt;/code&gt; exposed only for tests) to read or invoke private members from a test. This couples the test to the exact internal structure of the class, breaks every time the implementation is refactored, and tests something the caller cannot observe, meaning the test can pass while the actual public behavior is broken.&lt;/p&gt;</description></item><item><title>Testing Glossary</title><link>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/glossary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://beyond.minimumcd.org/docs/foundations/testing-fundamentals/glossary/</guid><description>&lt;p&gt;These definitions reflect how this site uses each term. They are not universal definitions -&#10;other communities may use the same words differently.&lt;/p&gt;&#10;&lt;h3 id="functional-acceptance-tests"&gt;Acceptance Tests&lt;/h3&gt;&#10;&lt;p&gt;Automated tests that verify a system behaves as specified. Acceptance tests&#10;exercise user workflows in a&#10;&lt;a href="https://beyond.minimumcd.org/docs/reference/glossary/#production-like-environment"&gt;production-like environment&lt;/a&gt; and confirm the implementation&#10;matches the acceptance criteria. They answer &amp;ldquo;did we build what was specified?&amp;rdquo; rather than&#10;&amp;ldquo;does the code work?&amp;rdquo; They do not validate whether the specification itself is correct -&#10;only real user feedback can confirm we are building the right thing.&lt;/p&gt;</description></item></channel></rss>