Test completed

Fires when a test has been completed. This happens when a testee submits a test or when the allotted duration for the test is up.

This can either be a regular test taken by a user of the Drillster platform, or an anonymous test taken on the basis of a pre-obtained test ticket.

A group structure is required in order to receive TestCompleted events. This means that in order to receive TestCompleted events for anonymous tests, a group needs to be set up. Please contact support@drillster.com for assistance.

Example target URL

A target URL could like this:

POST https://www.example.com/drillster/TEST_COMPLETED

Payload

A PUSH TestCompletedEvent object.

Example

Below is an example of a regular test taken by a user of the Drillster platform. It contains a reference to the user account.

{
  "eventId": "ed5c3c37-511b-454e-be1f-282d781e2526",
  "eventType": "TEST_COMPLETED",
  "id": "qpynjYetO5Ti7sHOsSERVg",
  "started": "2016-03-29T15:33:33Z",
  "completed": "2016-03-29T15:33:48Z",
  "score": {
    "percentage": 100,
    "transformations": [
      {
        "id": "pass-at-seventy-percent",
        "passed": true,
        "result": "you passed"
      }
    ]
  },
  "test": {
    "id": "On7tRw6J9hYCrRF1G7hqtQ"
  },
  "user": {
    "emailAddress": "jane@example.com",
    "id": "hs50JqogSRiKSC18ivnOmw",
    "name": "Jane Doe",
    "thirdPartyIds": [
      {
        "id": "abc123",
        "thirdParty": "EXAMPLE"
      }
    ]
  }
}

This is an example of an anonymous test, which is taken on the basis of a pre-obtained test ticket:

{
  "id": "qpynjYetO5Ti7sHOsSERVg",
  "started": "2016-03-29T15:33:33Z",
  "completed": "2016-03-29T15:33:48Z",
  "score": {
    "percentage": 100,
    "transformations": [
      {
        "id": "pass-at-seventy-percent",
        "passed": true,
        "result": "you passed"
      }
    ]
  },
  "test": {
    "id": "On7tRw6J9hYCrRF1G7hqtQ"
  },
  "ticket": {
    "id": "U5etV0MI6Ozi6nb7ZdMf4q",
    "emailAddress": "john@example.com",
    "name": "John Doe",
    "reference": "t00042"
  }
}

Obtaining context information

In order to find out more information about the context of the test completed event, the recipient of the event may call the GET /api/2.1.1/test/{test_id}/accesses endpoint. This will, among other things, provide insight into the groups associated with the test that has just been completed.

Additionally, to find out the entire list of groups that the user is a member of, the GET /api/2.1.1/group/subscriptions?groupMemberId=… may be used. By intersecting this information with the test accesses data the group memberships associated with this event may be determined. Keep in mind that it is possible that the event is associated with more than one group if both the test and the user are part of multiple groups. Conversely it is possible that the event is associated with no groups in the case of an anonymous test.