Retrieve Test Results
The following query retrieves the last 100 test results for a given build:
- Query
- cURL
query GetBuildTestResults($buildId: ObjectID!) {
node(id: $buildId) {
... on Build {
status
passed
failedTestCount
testResults(first: 100) {
nodes {
passed
severity
reportTemplate {
code
name
}
}
}
}
}
}
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 GetBuildTestResults($buildId: ObjectID!) { node(id: $buildId) { ... on Build { status passed failedTestCount testResults(first: 100) { nodes { passed severity reportTemplate { code name } } } } } }"}' https://api.lumar.io/graphql