API Documentation

Suite Result Resource

Search our documentation:

Toggle Documentation Menu

API: Suite Result Resource

Jump to...
  • Get - Fetch a single suite result
  • List Test Results - Fetch an array of test results for a suite result


Get Suite Result

Fetch a single suite result

Request
GEThttps://api.ghostinspector.com/v1/suite-results/<suiteResultId>/?apiKey=<apiKey>
Parameters
apiKey
Your API key provided in your account
suiteResultId
The ID of the suite result to fetch
Response
{
  "code": "SUCCESS",
  "data": {
    "_id": "57bf632943c0e7f5673d891d",
    "suite": {
      "_id": "57b0f2b6ed9a72081f9ca18d",
      "organization": "547fb82d92423992d52a4fea",
      "name": "Sample Suite"
    },
    "dateCreated": "2016-08-25T21:29:13.457Z",
    "dateExecutionFinished": "2016-08-25T21:29:58.620Z",
    "dateExecutionStarted": "2016-08-25T21:29:13.457Z",
    "executionTime": 45163,
    "countScreenshotCompareUnknown": 2,
    "countScreenshotCompareFailing": 0,
    "countScreenshotComparePassing": 0,
    "countUnknown": 0,
    "countFailing": 0,
    "countPassing": 2,
    "screenshotComparePassing": null,
    "passing": true
  }
}


Suite Results – List Test Results

Fetch an array containing the test results in a suite result. Results are returned in the order they were created when the suite was triggered (typically alphabetical order by test name).

Request
GEThttps://api.ghostinspector.com/v1/suite-results/<suiteResultId>/results/?apiKey=<apiKey>
Parameters
apiKey
Your API key provided in your account
suiteResultId
The ID of the suite result containing the test results
count
The number of results to return (default 10, maximum 50)
offset
The number of results to offset the returned set by (default 0)
Response
{
  "code": "SUCCESS",
  "data": [
    {
      "_id": "5335c6a6eecee7735866df68",
      "dateExecutionFinished": "2014-03-28T19:00:01.861Z",
      "dateExecutionStarted": "2014-03-28T18:59:50.863Z",
      "startUrl": "https://www.google.com/",
      "endUrl": "https://www.google.com/#q=ghosts",
      "test": {
        "_id": "5335c6a5f6d88b3069f1ac06",
        "name": "Google Test",
        "suite": "5330e25967076985585532fb",
        "organization" : "52df0d27fbaced54db000006"
      },
      "screenshot": {
        "small": {
          "depth": 8,
          "format": "PNG",
          "oname": "5335c6a6eecee7735866df68.png",
          "mtime": "2014-03-28T19:00:02.000Z",
          "ctime": "2014-03-28T19:00:02.000Z",
          "size": 12522,
          "path": "/screenshots/5335c6a6eecee7735866df68-small.png",
          "defaultUrl": "https://ghostinspector.s3.amazonaws.com/screenshots/5335c6a6eecee7735866df68-small.png",
          "dims": {
            "w": 320,
            "h": 240
          }
        },
        "original": {
          "depth": 8,
          "format": "PNG",
          "oname": "5335c6a6eecee7735866df68.png",
          "mtime": "2014-03-28T19:00:01.000Z",
          "ctime": "2014-03-28T19:00:01.000Z",
          "size": 39013,
          "path": "/screenshots/5335c6a6eecee7735866df68-original.png",
          "defaultUrl": "https://ghostinspector.s3.amazonaws.com/screenshots/5335c6a6eecee7735866df68-original.png",
          "dims": {
            "w": 1024,
            "h": 768
          }
        }
      },
      "screenshotCompareDifference": null,
      "screenshotComparePassing": null,
      "video": {
        "dims": {
          "w": 1024,
          "h": 768
        },
        "path": "/videos/53516d4fe0d6891bf054be20.mp4",
        "url": "https://ghostinspector.s3.amazonaws.com/videos/53516d4fe0d6891bf054be20.mp4"
      },
      "passing": false,
      "console": [...],
      "steps": [...],
      "extractions": {...},
      "viewportSize": {
        "height": 768,
        "width": 1024
      }
    },
    {
      "_id": "5338ab0573b3e7c25c5b1801",
      "dateExecutionFinished": "2014-03-30T23:38:58.163Z",
      "dateExecutionStarted": "2014-03-30T23:38:45.906Z",
      "startUrl": "https://www.google.com/",
      "endUrl": "https://www.google.com/#q=ghosts",
      "test": {
        "_id": "5335c6a5f6d88b3069f1ac06",
        "name": "Google Test",
        "suite": "5330e25967076985585532fb",
        "organization" : "52df0d27fbaced54db000006"
      },
      "screenshot": {
        "small": {
          "depth": 8,
          "format": "PNG",
          "oname": "5338ab0573b3e7c25c5b1801.png",
          "mtime": "2014-03-30T23:38:58.000Z",
          "ctime": "2014-03-30T23:38:58.000Z",
          "size": 12754,
          "path": "/screenshots/5338ab0573b3e7c25c5b1801-small.png",
          "defaultUrl": "https://ghostinspector.s3.amazonaws.com/screenshots/5338ab0573b3e7c25c5b1801-small.png",
          "dims": {
            "w": 320,
            "h": 240
          }
        },
        "original": {
          "depth": 8,
          "format": "PNG",
          "oname": "5338ab0573b3e7c25c5b1801.png",
          "mtime": "2014-03-30T23:38:58.000Z",
          "ctime": "2014-03-30T23:38:58.000Z",
          "size": 43294,
          "path": "/screenshots/5338ab0573b3e7c25c5b1801-original.png",
          "defaultUrl": "https://ghostinspector.s3.amazonaws.com/screenshots/5338ab0573b3e7c25c5b1801-original.png",
          "dims": {
            "w": 1024,
            "h": 768
          }
        }
      },
      "screenshotCompareDifference": null,
      "screenshotComparePassing": null,
      "video": {
        "dims": {
          "w": 1024,
          "h": 768
        },
        "path": "/videos/53516d4fe0d6891bf054be20.mp4",
        "url": "https://ghostinspector.s3.amazonaws.com/videos/53516d4fe0d6891bf054be20.mp4"
      },
      "passing": false,
      "console": [...],
      "steps": [...],
      "extractions": {...},
      "viewportSize": {
        "height": 768,
        "width": 1024
      }
    }
  ]
}