0

I know the title of the questions its too much generic, but i making my best. Thanks to everyone. SORRY FOR THIS LONG QUESTION MY ENGLISH ITS NO PERFECT I DONT KNOW IF I COULD SHORTEN THE QUESTION :S

So, the first thing.

  • I used xray cloud API for making requests.
  • I can make the requests with GraphQL
  • I use postman for making this requests.

I have no problem with the documentation. This one -> https://xray.cloud.getxray.app/doc/graphql/testplan.doc.html I can retrieve any data with this.

Now, its a struggle some times to retrieve data which its easyly readeble in JIRA/XRAY WEB but to retrieve the same data with the API its painfull.

I am gonna put two example. The FIRST one On XRAY/JIRA WEB i can acces to this metrics (goin through 'Testing Board' -> 'Reports' -> 'Test Plan Metrics') as you can see in the image How to access to TestPlan metrics

,Then TestPlan metrics

Finally just click on 'Generate Report' and you will se something like this DATA HERE, we can see some data like the 'status', 'total of test executions', 'test runs', 'test', 'defects' and 'test types'. I RETRIEVE THIS DATA VÍA XRAYCLOUD API WITH GRAPHQL ON POSTMAN (following the documentation), like this:

query ($issueIdKey: String){

getTestPlan(issueId: $issueIdKey) {
    issueId
    jira(fields: ["key", "summary", "status", "description", "assignee", "reporter"])
    tests(limit:100){
        total
    }
    testExecutions(limit:10){
            total
            results{
                issueId
                jira(fields: ["key", "summary", "status", "description", "assignee", "reporter"])
                testRuns(limit:100){
                    total   
                    results{
                        test{
                            jira(fields: ["key", "summary", "priority", "status"])
                            issueId
                            status{
                                name
                            }
                            testType {
                                name
                            }
                            preconditions(limit: 10) {
                                total
                                results {
                                    jira(fields: ["key", "summary"])
                                }
                            }                         
                        }
                        comment
                        defects
                        status{
                            name
                        }
                        evidence{
                            filename
                        }
                        steps{
                            id
                            action
                            data
                            result
                            attachments {
                                filename
                            }
                            defects
                            evidence{
                                filename
                            }
                            comment
                        }
                    }
                }
            }
        }
}

}

THERE ITS ANYWAY to EXTRACT THE DATA WE HAVE SEEN ON THE IMAGE WITHOUT GOING THROUGH ALL THIS REQUEST? (ON THE REQUEST i have to navigate through the TestExecutions, then through testRuns and finally throug test of the TestRun) According to the documentation i CANT get the 'DEFECTS' of the TestPlan (nor the TEST).

So, this its the thing, THERE ITS ANYWAY TO EXTRACT ALL THIS DATA EASLY AS FOR EXMAPLE PROPERTIES OF THE TESTPLAN?

And THE SECOND one its not a big deal as the first one. But if you have something to say about i would love to hear it. Example 1:

On XRAY/JIRA WEB i have this data for example

As you can see i have the execution result of the TestPlan (which its the total result execution of all de TestCases)

My wonder here it is, there is any way i can reatry this execution result of the TestPlan easyly with the Xray Cloud Api using GraphQL? Because for me, if i want to retrieve the execution result of the TestPlan i have to retrieve ALL TEST and see the result of each one.

In general. There it is anyway to extract data (or properties) of the TESTPLAN without going through ALL TEST (or TEST EXECUTION or TEST RUNS)? Thank you, i would appreciate any response to my question!

Ismael
  • 23
  • 4

0 Answers0