Skip to main content

Retrieve Builds

Retrieve all builds belonging to a test suite

The following query retrieves the last 100 builds of a given test suite:

Operation: query GetTestSuiteBuilds($testSuiteId: ObjectID!) { node(id: $testSuiteId) { ... on TestSuite { builds(last: 100) { nodes { status createdAt finishedAt passed failedTestCount } } } } }
GetTestSuiteBuildsTry in Explorer
GraphQL
query GetTestSuiteBuilds($testSuiteId: ObjectID!) {
node(id: $testSuiteId) {
... on TestSuite {
builds(last: 100) {
nodes {
status
createdAt
finishedAt
passed
failedTestCount
}
}
}
}
}

Retrieve the latest build belonging to a test suite

The following query retrieves the latest build of a given test suite:

Operation: query GetTestSuiteLatestBuild($testSuiteId: ObjectID!) { node(id: $testSuiteId) { ... on TestSuite { builds(first: 1, orderBy: {direction: DESC, field: createdAt}) { nodes { status createdAt } } } } }
GetTestSuiteLatestBuildTry in Explorer
GraphQL
query GetTestSuiteLatestBuild($testSuiteId: ObjectID!) {
node(id: $testSuiteId) {
... on TestSuite {
builds(first: 1, orderBy: {direction: DESC, field: createdAt}) {
nodes {
status
createdAt
}
}
}
}
}