Files
zeekay abf99d05fc papers: reorganize into per-paper dirs, add Antje Worring as co-author
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.
2026-04-18 21:50:07 -07:00

63 lines
1.7 KiB
TeX

\section{Layer 4: End-to-End Tests}
E2E tests run the full system (multiple node processes, real networking, real storage)
and verify user-visible behavior.
\subsection{Playwright for Web/API E2E}
\begin{lstlisting}[language=TypeScript,caption={Playwright E2E test for transaction submission}]
import { test, expect } from '@playwright/test';
test('submit transaction and verify inclusion', async ({ request }) => {
// Submit a transfer transaction
const txHash = await submitTransaction(request, {
from: testAccount1,
to: testAccount2,
value: '1000000000000000000', // 1 LUX
});
// Wait for block inclusion
const receipt = await waitForReceipt(request, txHash, {
timeout: 30000,
});
expect(receipt.status).toBe(1);
expect(receipt.blockNumber).toBeGreaterThan(0);
// Verify balance change
const balance = await getBalance(request, testAccount2);
expect(BigInt(balance)).toBeGreaterThanOrEqual(
BigInt('1000000000000000000')
);
});
\end{lstlisting}
\subsection{Network E2E Tests}
Our network E2E tests use the Lux CLI to spin up local networks and verify:
\begin{itemize}[nosep]
\item Chain bootstrapping and block production.
\item Cross-chain messaging (Teleport).
\item Validator addition/removal during operation.
\item Node restart and state recovery.
\end{itemize}
\begin{lstlisting}[language=bash,caption={E2E test via Lux CLI}]
# Start a local 5-node network
lux network start --nodes 5
# Wait for chain to produce blocks
lux network health --wait 30s
# Submit transactions
lux transaction send --amount 1 --to 0x1234...
# Verify finality
lux chain status --chain C
# Stop network
lux network stop
\end{lstlisting}
%% ============================================================