BuildkiteTestCollector.TestResult (buildkite_test_collector v0.3.1)
Information about in individual test execution.
Contains the details needed to process the analytics for the test, such as success/failure, failure reason, trace, etc.
Summary
Types
More information about a test failure, if available
The test run timing and tracing
A tracing span
Individual test summary. Spec as yet unconfirmed.
Functions
Add a tracing span to the test result history.
Convert the test result into a map ready for serialisation to JSON.
Convert an ExUnit.Test
into a Buildkite Test Analytics datum.
Types
More information about a test failure, if available
@type history() :: %{ :start_at => BuildkiteTestCollector.Instant.t(), :end_at => BuildkiteTestCollector.Instant.t(), :duration => number(), :children => [span()], optional(:detail) => map() }
The test run timing and tracing
@type span() :: %{ :section => :http | :sql | :sleep | :annotation, :duration => BuildkiteTestCollector.Duration.t(), optional(:start_at) => BuildkiteTestCollector.Instant.t(), optional(:end_at) => BuildkiteTestCollector.Instant.t(), optional(:detail) => String.t() }
A tracing span
@type t() :: %BuildkiteTestCollector.TestResult{ failure_expanded: nil | expanded_failure(), failure_reason: nil | String.t(), file_name: String.t(), history: history(), id: Ecto.UUID.t(), location: term(), name: String.t(), result: String.t(), scope: String.t() }
Individual test summary. Spec as yet unconfirmed.
Functions
Add a tracing span to the test result history.
@spec as_json(t(), BuildkiteTestCollector.Instant.t()) :: map()
Convert the test result into a map ready for serialisation to JSON.
This is done as a separate step because all timings are relative to the payload start time, so must be calculated.
@spec new(ExUnit.Test.t(), BuildkiteTestCollector.Instant.t() | nil) :: t()
Convert an ExUnit.Test
into a Buildkite Test Analytics datum.