Create Tests
The follwing mutation creates a test for a test suite:
- Query
- cURL
mutation CreateTest($testSuiteId: ObjectID!, $reportTemplateCode: String!) {
createTest(input: {
testSuiteId: $testSuiteId,
reportTemplateCode: $reportTemplateCode
}) {
test {
id
}
}
}
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 CreateTest($testSuiteId: ObjectID!, $reportTemplateCode: String!) { createTest(input: { testSuiteId: $testSuiteId, reportTemplateCode: $reportTemplateCode }) { test { id } } }"}' https://api.lumar.io/graphql
tip
testSuiteId
and reportTemplateCode
are the only required parameters.