API Documentation

Test Result Resource

Search our documentation:

Toggle Documentation Menu

API: Test Result Resource

Jump to...
  • Get - Fetch a single test result


Get Test Result

Fetch a single test result

Request
GET https://api.ghostinspector.com/v1/results/<resultId>/?apiKey=<apiKey>
Parameters
apiKey
Your API key provided in your account
resultId
The ID of the test result to fetch
Response
{
  "code": "SUCCESS",
  "data": {
    "_id": "5351669ce0d6891bf054be1b",
    "dateExecutionFinished": "2014-04-18T17:53:42.148Z",
    "dateExecutionStarted": "2014-04-18T17:53:32.188Z",
    "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": "5351669ce0d6891bf054be1b.png",
        "mtime": "2014-04-18T17:53:42.000Z",
        "ctime": "2014-04-18T17:53:42.000Z",
        "size": 111709,
        "path": "/screenshots/5351669ce0d6891bf054be1b-small.png",
        "defaultUrl": "https://ghostinspector.s3.amazonaws.com/screenshots/5351669ce0d6891bf054be1b-small.png",
        "dims": {
          "w": 320,
          "h": 720
        }
      },
      "original": {
        "depth": 8,
        "format": "PNG",
        "oname": "5351669ce0d6891bf054be1b.png",
        "mtime": "2014-04-18T17:53:42.000Z",
        "ctime": "2014-04-18T17:53:42.000Z",
        "size": 446945,
        "path": "/screenshots/5351669ce0d6891bf054be1b-original.png",
        "defaultUrl": "https://ghostinspector.s3.amazonaws.com/screenshots/5351669ce0d6891bf054be1b-original.png",
        "dims": {
          "w": 1024,
          "h": 2305
        }
      }
    },
    "screenshotCompareDifference": null,
    "screenshotComparePassing": null,
    "video": {
      "dims": {
        "w": 1024,
        "h": 768
      },
      "path": "/videos/5351669ce0d6891bf054be1b.mp4",
      "url": "https://ghostinspector.s3.amazonaws.com/videos/5351669ce0d6891bf054be1b.mp4"
    },
    "passing": true,
    "console": [],
    "steps": [
      {
        "command": "click",
        "target": "#gbqfq",
        "url": "https://www.google.com/",
        "dateExecuted": "2014-04-18T17:53:35.170Z",
        "_id": "5351669fe0d6891bf054be1c",
        "passing": true,
        "private": false,
        "sequence": 0
      },
      {
        "command": "assign",
        "target": "#gbqfq",
        "value": "ghosts",
        "url": "https://www.google.com/",
        "dateExecuted": "2014-04-18T17:53:35.584Z",
        "_id": "5351669fe0d6891bf054be1d",
        "passing": true,
        "private": false,
        "sequence": 1
      },
      {
        "command": "keypress",
        "target": "#gbqfq",
        "value": "13",
        "url": "https://www.google.com/",
        "dateExecuted": "2014-04-18T17:53:35.954Z",
        "_id": "5351669fe0d6891bf054be1e",
        "passing": true,
        "private": false,
        "sequence": 2
      },
      {
        "command": "assertElementPresent",
        "target": "#resultStats",
        "value": "",
        "url": "https://www.google.com/",
        "dateExecuted": "2014-04-18T17:53:36.670Z",
        "_id": "535166a0e0d6891bf054be1f",
        "passing": true,
        "private": false,
        "sequence": 3
      }
    ],
    "extractions": {
      "token": "1234567890"
    },
    "viewportSize": {
      "height": 768,
      "width": 1024
    }
  }
}