Skip to content

Add json schema for test output #7813

Open
@mattsse

Description

@mattsse

Component

Forge

Describe the feature you would like

the test --json output can be useful for better integration.

pub struct SuiteResult {
/// Wall clock time it took to execute all tests in this suite.
#[serde(with = "humantime_serde")]
pub duration: Duration,
/// Individual test results: `test fn signature -> TestResult`.
pub test_results: BTreeMap<String, TestResult>,
/// Generated warnings.
pub warnings: Vec<String>,
/// Libraries used to link test contract.
pub libraries: Libraries,
/// Contracts linked with correct libraries.
#[serde(skip)]
pub known_contracts: Arc<ContractsByArtifact>,
}

We currently don't have a proper spec for this making it hard to generate TS bindings for example.

This could be useful here: https://docs.rs/schemars/latest/schemars/

TODO

generate json schema for test --json ouput

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions