Update Tests
The follwing mutation updates a test:
- Query
- cURL
mutation UpdateTest($testId: ObjectID!, $relativeTreshold: Int, $serverity: Severity) {
updateTest(input: {
testId: $testId,
relativeThreshold: $relativeTreshold,
severity: $severity
}) {
test {
id
relativeThreshold
severity
}
}
}
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":"mutation UpdateTest($testId: ObjectID!, $relativeTreshold: Int, $serverity: Severity) { updateTest(input: { testId: $testId, relativeThreshold: $relativeTreshold, severity: $severity }) { test { id relativeThreshold severity } } }"}' https://api.lumar.io/graphql
caution
- It's not possible to update the report template code for a test suite's test. You need to delete the test and create a new one with the new report template code.
- Updating test won't affect previously completed builds and test results.