Statistics

The Basics

Statistics for a Test Suite are obtained using the /statistics resource. You need to specify the Id of the owning Test Suite as a URL segment.

Working with Statistics

To fetch the statistics for a Test Suite, send a GET request to the the statistics resource, specifiying the Id of the Test Suite.

http://localhost:8080/api/v1/statistics/6F1204886EF340E88BAD68B46568D719

Suites can have multiple Statistics associated with them (or have none), so the returned data is an array of zero or more statistic objects. Each statistic object will contain an array of none or more snapshot objects - each containing the results of running a snapshot in the T-Plan UI. Each snapshot object in turn will have one or more counts - these corresponding to the Test Statuses set in the application.

Currently, only Suite -> Suite statistics are supported, so this resource can only be used for statistics that track test execution progress.

{
  "status": "success",
  "data": {
    "statistics": [
      {
        "statistic": {
          "id": "F47F9AAF9D514D1AAEA8F778E309E26C",
          "name": "Win 2000 & IE 6.0",
          "description": "Execution Statistics ",
          "snapshots": [
            {
              "snapshot": {
                "date": "2003-03-15T15:54:19.956Z",
                "counts": [
                  {
                    "count": {
                      "status": "Not Scripted",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scheduled",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Not Tested",
                      "percent": 100
                    }
                  }
                ]
              }
            },
            {
              "snapshot": {
                "date": "2003-03-22T16:19:39.993Z",
                "counts": [
                  {
                    "count": {
                      "status": "Not Available",
                      "percent": 26.595745
                    }
                  },
                  {
                    "count": {
                      "status": "Tested & Failed",
                      "percent": 5.319149
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scripted",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scheduled",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Tested & Passed",
                      "percent": 60.638298
                    }
                  },
                  {
                    "count": {
                      "status": "Not Tested",
                      "percent": 7.446809
                    }
                  }
                ]
              }
            },
            {
              "snapshot": {
                "date": "2003-03-29T17:07:37.976Z",
                "counts": [
                  {
                    "count": {
                      "status": "Not Available",
                      "percent": 8.510638
                    }
                  },
                  {
                    "count": {
                      "status": "Tested & Failed",
                      "percent": 4.255319
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scripted",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scheduled",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Tested & Passed",
                      "percent": 85.106383
                    }
                  },
                  {
                    "count": {
                      "status": "Not Tested",
                      "percent": 2.12766
                    }
                  }
                ]
              }
            },
            {
              "snapshot": {
                "date": "2016-04-29T12:13:02.003Z",
                "counts": [
                  {
                    "count": {
                      "status": "Not Available",
                      "percent": 8.510638
                    }
                  },
                  {
                    "count": {
                      "status": "Tested & Failed",
                      "percent": 4.255319
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scripted",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scheduled",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Tested & Passed",
                      "percent": 84.042553
                    }
                  },
                  {
                    "count": {
                      "status": "Not Tested",
                      "percent": 3.191489
                    }
                  }
                ]
              }
            },
            {
              "snapshot": {
                "date": "2016-04-29T12:13:54.016Z",
                "counts": [
                  {
                    "count": {
                      "status": "Not Available",
                      "percent": 8.510638
                    }
                  },
                  {
                    "count": {
                      "status": "Tested & Failed",
                      "percent": 1.06383
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scripted",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Not Scheduled",
                      "percent": 0
                    }
                  },
                  {
                    "count": {
                      "status": "Tested & Passed",
                      "percent": 89.361702
                    }
                  },
                  {
                    "count": {
                      "status": "Not Tested",
                      "percent": 1.06383
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}