Retrieve Builds
Retrieve all builds belonging to a test suite
The following query retrieves the last 100 builds of a given test suite:
- Query
- cURL
query GetTestSuiteBuilds($testSuiteId: ObjectID!) {
node(id: $testSuiteId) {
... on TestSuite {
builds(last: 100) {
nodes {
status
createdAt
finishedAt
passed
failedTestCount
}
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"query GetTestSuiteBuilds($testSuiteId: ObjectID!) { node(id: $testSuiteId) { ... on TestSuite { builds(last: 100) { nodes { status createdAt finishedAt passed failedTestCount } } } } }"}' https://api.lumar.io/graphql
Retrieve the latest build belonging to a test suite
The following query retrieves the latest build of a given test suite:
- Query
- cURL
query GetTestSuiteLatestBuild($testSuiteId: ObjectID!) {
node(id: $testSuiteId) {
... on TestSuite {
builds(first: 1, orderBy: {direction: DESC, field: createdAt}) {
nodes {
status
createdAt
}
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"query GetTestSuiteLatestBuild($testSuiteId: ObjectID!) { node(id: $testSuiteId) { ... on TestSuite { builds(first: 1, orderBy: {direction: DESC, field: createdAt}) { nodes { status createdAt } } } } }"}' https://api.lumar.io/graphql