OBJECT

getBDDStepLibrary

link GraphQL Schema definition

1Query getBDDStepLibrary {
2
3# Returns the steps of the BDD Step Library.
4# Either projectId (steps of the library linked to that project) or testIssueId (steps used by that Test) must be provided. If both are provided, the Test must belong to the given
5# project.
6# The optional search text is matched case-insensitively against the step definition (step parameter placeholders are normalized before matching) or description.
7# Deprecated steps are not returned. Only steps the user has permission to view are returned.
8#
9#
10# Arguments
11# projectId: The project id. Either this or testIssueId must be provided.
12# search: Search text to match against the step definition or description.
13# testIssueId: Filter steps linked to a specific test issue. Either this or projectId must be provided.
14# limit: The maximum amount of steps to be returned. The maximum is 100.
15# start: The index of the first item to return in the page of results (page offset).
16getBDDStepLibrary(projectId: String, search: String, testIssueId: String, limit: Int!, start: Int): BDDStepLibraryResults
17
18}

link Example

The query below returns the first 10 steps of the BDD Step Library of the project 10000 that contain "login".

{
    getBDDStepLibrary(projectId: "10000", search: "login", limit: 10) {
        total
        start
        limit
        results {
            id
            definition
            description
            labels
            lastModified
            associatedTests
            library {
                id
                name
                isGlobal
                projectIds
            }
        }
    }
}

The query below returns the BDD Step Library steps used by the Test 12345.

{
    getBDDStepLibrary(testIssueId: "12345", limit: 100) {
        total
        results {
            id
            definition
            associatedTests
        }
    }
}