Expand description
ferridriver-test – High-performance E2E test runner for browser automation.
Provides a Playwright Test-compatible API for writing and running browser tests with automatic fixture injection, parallel execution, and rich reporting.
§Quick Start (Rust)
ⓘ
use ferridriver_test::prelude::*;
#[ferritest]
async fn basic_navigation(ctx: TestContext) {
let page = ctx.page().await?;
page.goto("https://example.com", None).await?;
expect(&*page).to_have_title("Example Domain").await?;
}
#[ferritest(retries = 2, tag = "smoke")]
async fn login_test(ctx: TestContext) {
let page = ctx.page().await?;
page.goto("https://app.example.com/login", None).await?;
page.locator("#email").fill("user@example.com").await?;
page.locator("#password").fill("password").await?;
page.locator("button[type=submit]").click().await?;
expect(&*page).to_have_url("https://app.example.com/dashboard").await?;
}Re-exports§
pub use config::CliOverrides;pub use config::TestConfig;pub use config::parse_common_cli_args;pub use context::TestContext;pub use discovery::HookKindTag;pub use discovery::HookRegistration as InventoryHookRegistration;pub use discovery::TestRegistration;pub use expect::ToPassOptions;pub use expect::expect;pub use expect::expect_configured;pub use expect::expect_poll;pub use expect::to_pass;pub use expect::to_pass_with_options;pub use fixture::FixturePool;pub use model::HookDef;pub use model::HookKind;pub use model::HookOwner;pub use model::HookPhase;pub use model::HookRegistration;pub use model::HookScope;pub use model::SuiteDef;pub use model::SuiteMode;pub use model::TestAnnotation;pub use model::TestCase;pub use model::TestFailure;pub use model::TestFixtures;pub use model::TestFn;pub use model::TestId;pub use model::TestInfo;pub use model::TestModifiers;pub use model::TestOutcome;pub use model::TestPlan;pub use model::TestPlanBuilder;pub use model::TestStatus;pub use model::TestStep;pub use reporter::EventBus;pub use reporter::EventBusBuilder;pub use reporter::Reporter;pub use reporter::ReporterDriver;pub use reporter::ReporterEvent;pub use reporter::ReporterSet;pub use reporter::Subscription;pub use runner::TestRunner;pub use inventory;
Modules§
- config
- Test configuration: file-based, CLI, and environment variable resolution.
- context
- Test context: the single object passed to every
#[ferritest]function. - ct
- Component testing core (ct-core).
- discovery
- Test discovery: inventory-based collection for Rust, glob-based file scanning.
- dispatcher
- Test dispatcher: MPMC work queue supporting parallel and serial suites.
- expect
- Auto-retrying assertions matching Playwright’s full
expect()API. - fixture
- Fixture system: dependency-injected, scoped, auto-teardown.
- interactive
- Interactive key handler for watch mode.
- logging
- Centralized tracing/logging initialization.
- model
- Core test model types:
TestId,TestCase,TestSuite,TestPlan,TestOutcome,TestInfo,TestStep,SuiteMode. - prelude
- Prelude for convenient imports in test files.
- reporter
- Reporter system: event-driven, multiplexed, trait-based.
- retry
- Retry policy and flaky test detection.
- runner
- Test runner orchestrator: overlaps browser launch with test dispatch, handles retries with flaky detection.
- server
- TestServer: Playwright-style HTTP server for E2E test fixtures.
- shard
- Deterministic sharding for distributing tests across CI machines.
- snapshot
- Text snapshot testing: save expected output to
.snapfiles, diff on mismatch. - tracing
- Trace recording in Playwright-compatible format.
- tui
- Watch mode TUI: fullscreen ratatui dashboard with real-time test progress.
- tui_
reporter - TUI reporter: translates ReporterEvents into TuiMessages for the dashboard.
- watch
- File watcher for watch mode: detects file changes, classifies them, and sends events through an async channel with debounce.
- worker
- Worker: owns a browser instance, executes hooks, creates fresh context+page per test.
Macros§
- main
- Run all
#[ferritest]tests in this binary.
Functions§
- run_
harness - Entry point called by
main!(). Parses CLI args, loads config, discovers tests, and runs them.
Attribute Macros§
- after_
all - Runs once after all tests in the containing module (suite).
- after_
each - Runs after each test in the containing module (suite), even on failure.
- before_
all - Runs once before all tests in the containing module (suite).
- before_
each - Runs before each test in the containing module (suite).
- ferritest
#[ferritest]attribute macro.- ferritest_
each #[ferritest_each(data = [("a", 1), ("b", 2)])]— parameterized test macro.