Skip to content

Add API endpoint to get subtests results #4606

@gsnedders

Description

@gsnedders

Currently, our API doesn't provide any way to get subtest results.

The dashboard does this:

// Slice summary file URL to infer the URL path to get single test data.
resultsURL(testRun, path) {
path = this.encodeTestPath(path);
// This is relying on the assumption that result
// files end with '-summary.json.gz' or '-summary_v2.json.gz'.
let resultsSuffix = '-summary.json.gz';
if (!testRun.results_url.includes(resultsSuffix)) {
resultsSuffix = '-summary_v2.json.gz';
}
const resultsBase = testRun.results_url.slice(0, testRun.results_url.lastIndexOf(resultsSuffix));
return `${resultsBase}${path}`;
}

It would be much nicer if we just had an endpoint similar to /api/results, maybe even just /api/results/subtest/a/b/c.html, which similarly redirects to relevant file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions