pub struct Fixture {
pub id: String,
pub category: Option<String>,
pub description: String,
pub tags: Vec<String>,
pub skip: Option<SkipDirective>,
pub call: Option<String>,
pub input: Value,
pub mock_response: Option<MockResponse>,
pub visitor: Option<VisitorSpec>,
pub assertions: Vec<Assertion>,
pub source: String,
pub http: Option<HttpFixture>,
}Expand description
A single e2e test fixture.
Fields§
§id: StringUnique identifier (used as test function name).
category: Option<String>Optional category (defaults to parent directory name).
description: StringHuman-readable description.
Optional tags for filtering.
skip: Option<SkipDirective>Skip directive.
call: Option<String>Named call config to use (references [e2e.calls.<name>]).
When omitted, uses the default [e2e.call].
input: ValueInput data passed to the function under test.
mock_response: Option<MockResponse>Optional mock HTTP response for testing HTTP clients.
visitor: Option<VisitorSpec>Optional visitor specification for visitor pattern tests.
assertions: Vec<Assertion>List of assertions to check.
source: StringSource file path (populated during loading).
http: Option<HttpFixture>HTTP server test specification. When present, this fixture tests an HTTP handler rather than a function call.
Implementations§
Source§impl Fixture
impl Fixture
Sourcepub fn is_http_test(&self) -> bool
pub fn is_http_test(&self) -> bool
Returns true if this is an HTTP server test fixture.
Sourcepub fn needs_mock_server(&self) -> bool
pub fn needs_mock_server(&self) -> bool
Returns true if this fixture requires a mock HTTP server.
Sourcepub fn is_streaming_mock(&self) -> bool
pub fn is_streaming_mock(&self) -> bool
Returns true if the mock response uses streaming (SSE).
Sourcepub fn resolved_category(&self) -> String
pub fn resolved_category(&self) -> String
Get the resolved category (explicit or from source directory).