OBJECT

createTest

link GraphQL Schema definition

1Mutation createTest {
2
3# Mutation used to create a new Test.
4#
5#
6# Arguments
7# testType: the Test Type of the Test.
8# steps: the Step definition of the test.
9# unstructured: the unstructured definition of the Test.
10# gherkin: the gherkin definition of the Test.
11# preconditionIssueIds: the Precondition ids that be associated with the Test.
12# folderPath: the Test repository folder for the Test.
13# jira: the Jira object that will be used to create the Test.
14# Check this Jira endpoint for more information related with this field.
15createTest(testType: UpdateTestTypeInput, steps: [CreateStepInput], unstructured: String, gherkin: String, preconditionIssueIds: [String], folderPath: String, jira: JSON!): CreateTestResult
16
17}

link Example

The mutation below will create a new Test.

mutation {
    createTest(
        testType: { name: "Generic" },
        unstructured: "Perform exploratory tests on calculator.",
        jira: {
            fields: { summary:"Exploratory Test", project: {key: "CALC"} }
        }
    ) {
        test {
            issueId
            testType {
                name
            }
            unstructured
            jira(fields: ["key"])
        }
        warnings
    }
}

The mutation below will create a new Test.

mutation {
    createTest(
        testType: { name: "Manual" },
        steps: [
            {
                action: "Create first example step",
                result: "First step was created"
            },
            {
                action: "Create second example step with data",
                data: "Data for the step",
                result: "Second step was created with data"
            }
        ],
        jira: {
            fields: { summary:"Exploratory Test", project: {key: "CALC"} }
        }
    ) {
        test {
            issueId
            testType {
                name
            }
            steps {
                action
                data
                result
            }
            jira(fields: ["key"])
        }
        warnings
    }
}