Skip to content

Development and Testing

André Borchert edited this page Aug 10, 2026 · 15 revisions

Development and Testing

The project uses SwiftPM and Swift Testing. The current CI toolchain is Swift 6.3 on macOS 26.

Resolve and build

swift package resolve
swift build

For the nested package:

cd Swift
swift package resolve
swift build

swift build is also the repository's available type-checking command. No dedicated lint or formatting command is defined.

Tests

Run the complete root-package suite:

swift test

Focused examples:

swift test --filter WebTransportPublicAPITests
swift test --filter WebTransportProcessTests
swift test --filter QUICUDPPortTests

The nested package can be tested with:

cd Swift
swift test

Test targets

Target Coverage area
WebTransportTests Public API, process behavior, stress, loopback, release artifacts, and API compatibility integration.
WebTransportNetworkRuntimeTests Runtime lifecycle, deterministic support, and runtime hardening.
WebTransportQUICCoreTests QUIC state, codecs, malformed input, parser hardening, and fuzz-style properties.
WebTransportUDPAppleTests IPv4 and IPv6 loopback UDP behavior.
WebTransportCryptoAppleTests Initial-key derivation and packet protection.
WebTransportTLSCoreTests TLS parsing, state, trust gating, and interoperability hardening.
WebTransportHTTP3CoreTests HTTP/3, QPACK, sessions, streams, datagrams, flow control, limits, and interoperability hardening.

Command-line conformance

swift run WebTransportClient --scenario all
swift run WebTransportServer --scenario all

Use --help and --list to inspect supported command-line behavior and scenarios.

API and release checks

cd Swift
./check-api-compatibility.sh
./build-release-apple-silicon.sh

The release script performs two clean release builds, compares product hashes, smoke-tests the executables, and writes reproducible Apple Silicon artifacts with SHA256SUMS under .build/release-artifacts/.

Validation by change type

Change type Expected checks
Documentation Check local and Wiki links, verify commands against source/config, and review rendered Markdown.
Public API swift build, swift test, and check-api-compatibility.sh.
Client or server CLI swift test and both conformance scenario suites.
Runtime or trust Runtime, public API, and process tests plus IPv4/IPv6 packet loopback.
HTTP/3, QPACK, or session logic HTTP3Core tests and relevant conformance scenarios.
QUIC, TLS, crypto, or UDP Matching test target plus an integration check when behavior crosses modules.
Release scripts or artifacts Release build script and CI workflow review.
Interoperability The relevant runner described in [[Release and Interoperability

External interoperability, VPS access, release packaging, concurrent process tests, and soak tests depend on the local environment. Record exactly which checks ran and do not infer a pass from older artifacts.

Contributor workflow

  1. Read the current implementation and its nearest tests before editing.
  2. Identify public API, protocol, trust, logging, manifest, CI, and documentation effects.
  3. Make the smallest coherent change in the owning module.
  4. Add or update tests that demonstrate the behavior and important edge cases.
  5. Run focused checks, then the broader suite appropriate to the change.
  6. Review the final diff for generated output, secrets, and unrelated changes.
  7. Update documentation when behavior, APIs, setup, commands, configuration, or workflows change.

Clone this wiki locally