Rust tests
Write tests with #[ferritest]; generate a harness with
ferridriver_test::main!(); run with cargo test.
Project layout
Harness
Tests
Every #[ferritest] function takes a single TestContext argument. The
macro binds the context regardless of the type annotation — name it
whatever you like.
Use ctx.page() for the pre-created Arc<Page>. Also available:
ctx.browser_context(), ctx.browser(), ctx.test_info().
The generated wrapper returns Result<(), TestFailure> and propagates
? — the body can use ? freely on anything that converts into
TestFailure.
Run
Tests run headed by default; pass --headless to opt into headless mode.
#[ferritest] attributes
Parameterized tests
Generates one test per row, named title_check (<row values>). The
first parameter is the test context; subsequent parameters receive the
tuple element(s).