Viewing a Single Report
When you register, you receive a link to the developer dashboard where you can view all proctoring reports directly on the AutoProctor website. To host the reporting experience on your own site, follow the instructions on this page.
Once a test attempt has been completed, you can render its proctoring report. A typical report looks like this. If the test hasn't been completed (because you haven't called the .stop() method), you can still load the report. You will see an empty state. You will also see a button to submit the test.
Loading the report
Once the AutoProctor instance is initialized with the credentials, the showReport() method fetches the violations and evidence and renders it as a table. For session recording, it creates a video playback element based on the different events it has recorded.
const apInst = new AutoProctor(credentials)
const reportOptions = {..};
apInst.showReport(reportOptions)
The reportOptions object
reportOptions objectThe reportOptions object accepts the following keys:
| key | datatype | meaning | default |
|---|---|---|---|
showProctoringSummary | bool | Show proctoring report | true |
proctoringSummaryDOMId | str | The DOM element to load the proctoring table onto | ap-report__proctor |
showSessionRecording | bool | Show session recording playback element | true |
sessionRecordingDOMId | str | The DOM element to load the session recording onto | ap-report__session |
groupReportsIntoTabs | bool | Group both reports into separate tabs | false |
tabContainerDOMId | str | If groupReportsIntoTabs is true, the ID of the DOM element to inject this into | ap-report-tab-container |
insertTestReportTab | bool | Add an extra tab for displaying test results from your system — for example, points scored or questions answered correctly | false |
testReportDOMId | str | If insertTestReportTab is true, the ID of the DOM element to inject this into | ap-report__test-results |
userDetails.name | str | Show the candidate's name below their photo | null |
userDetails.email | str | Show the candidate's email below their photo | null |
User Details
If user details were passed during .setup(), those values appear in the report automatically. Otherwise, pass a userDetails object in reportOptions. These details appear next to the candidate photo element (even if testTakerPhoto is false).
If the DOM ID's aren't specified, the SDK creates elements with the default ID's and inserts them at the end of the <body> element. If they are specified and they aren't in the DOM, an error is thrown on the console, but no report is loaded.
Getting the results as a JSON
To render the report using your own UI instead of the SDK's built-in table, call the .getReport() method:
const results = apInst.getReport()
This method returns the results as JSON. The response structure:
{
"attemptDetails": {
"id": 39359,
"label": "CJhBzI6Mzi",
"testServerStartTime": "2024-06-24T06:44:49.162772Z",
"testClientStartTime": "2024-06-24T06:45:06.247687Z",
"testFinishTime": "2024-06-24T06:45:29.397770Z",
"trustScore": 0.65,
"uaString": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
"numCreditsUsed": 1,
"lookupKey": null,
"miscData": {
"userDetails": {"name": "Tom Sawyer", "email": "tomsawyer@example.com"},
"sdkVersion": "4.1.0",
"evidenceCollectionWindow": 60,
"creditsRemaining": 68
},
"deviceType": "Chrome (desktop)",
"testAttemptUrl": "https://www.somecompany.com/?test-attempt-id=b659a4070a",
"testTakerPhotoUrl": "https://ap-core-ten-anomalies.s3.amazonaws.com/mock/random-photo-4.png",
"uniqueCode": null,
"allottedTime": null
},
"proctorSettings": {
"track": {
"audio": true,
"numHumans": true,
"tabSwitch": true,
"photosAtRandom": true,
"numPhotosAtRandom": 10,
"captureSwitchedTab": true,
"detectMultipleScreens": true,
"testTakerPhoto": true,
"forceFullScreen": false,
"recordSession": true,
"auxiliaryDevice": false,
"forceDesktop": false
},
"informUser": {
"testAdmin": true,
"testTaker": true
},
"proctorEnabled": true
},
"reportData": {
"evidence": [
{
"evidenceUrl": "https://ap-core-ten-anomalies.s3.amazonaws.com/mock/random-photo-4.png",
"label": "random-photo-taken",
"message": "Random Photo",
"violation": false,
"occurredAt": "2021-12-08T19:01:32Z"
},
{
"evidenceUrl": "https://ap-core-ten-anomalies.s3.amazonaws.com/nd/20240205/obkG9ZXZE3/anomalies/Jq3BTpELUI",
"label": "noise-detected",
"message": "Noise Detected",
"occurredAt": "2024-02-05T09:20:36Z",
"violation": true
},
{
"evidenceUrl": null,
"label": "tab-focus-gained",
"message": "Returned to application",
"violation": false,
"occurredAt": "2021-12-08T19:01:20Z"
},
{
"evidenceUrl": "https://ap-ten-anomalies.s3.amazonaws.com/nd/20211208/MhNp9VEPEx/tab_switches/iBNr3fiwJp",
"label": "tab-focus-lost",
"message": "Changed application",
"violation": true,
"occurredAt": "2021-12-08T19:01:15Z"
}
]
},
"testAttemptStatus": "trust_score_calculated",
"evidenceStatus": "processed",
"testAttemptJwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}