mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
Restructured from flat .tex/.pdf files into per-paper subdirectories. Added Antje Worring as co-author on all papers. Synced PDFs to pdfs/ for download site.
48 lines
2.0 KiB
TeX
48 lines
2.0 KiB
TeX
\section{The Testing Pyramid for Distributed Systems}
|
|
|
|
|
|
\subsection{Why a Pyramid}
|
|
|
|
Different testing techniques catch different bug classes at different costs:
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\small
|
|
\begin{tabular}{@{}llrrl@{}}
|
|
\toprule
|
|
\textbf{Layer} & \textbf{Technique} & \textbf{Cost} & \textbf{Speed} & \textbf{Catches} \\
|
|
\midrule
|
|
1 & Unit tests & Low & Fast & Logic bugs \\
|
|
2 & Integration tests & Medium & Medium & Interface bugs \\
|
|
3 & Property/fuzz tests & Medium & Medium & Edge cases, invariant violations \\
|
|
4 & E2E tests & High & Slow & System-level regressions \\
|
|
5 & Fault injection & High & Slow & Concurrency, network bugs \\
|
|
6 & Model checking & High & Medium & Protocol design bugs \\
|
|
7 & Formal proofs & Very high & Slow & Mathematical correctness \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{The testing pyramid. Lower layers are cheaper and run more frequently.}
|
|
\end{table}
|
|
|
|
The pyramid shape means: many unit tests (cheap, fast), fewer integration tests, even
|
|
fewer E2E tests, and a handful of formal proofs (expensive, slow). Every layer is
|
|
necessary---no layer substitutes for another.
|
|
|
|
\subsection{What Each Layer Misses}
|
|
|
|
\begin{itemize}[nosep]
|
|
\item \textbf{Unit tests} miss: interactions between components, timing dependencies,
|
|
network behavior.
|
|
\item \textbf{Integration tests} miss: system-level emergent behavior, rare failure modes.
|
|
\item \textbf{Property tests} miss: bugs that require specific state sequences (they test
|
|
properties of individual operations, not sequences).
|
|
\item \textbf{E2E tests} miss: rare timing conditions (they run the happy path and a few
|
|
error paths).
|
|
\item \textbf{Fault injection} misses: bugs in the protocol design (it tests the
|
|
implementation, not the specification).
|
|
\item \textbf{Model checking} misses: implementation bugs (it verifies the model, not the code).
|
|
\item \textbf{Formal proofs} miss: everything that is not in the formal model.
|
|
\end{itemize}
|
|
|
|
%% ============================================================
|