Resuming a Test

You may want to resume a proctoring session for a few reasons:

  • Your candidate accidentally reloads the webpage
  • Your candidate closes the tab/browser and restarts the test
  • Your test consists of different sections and you want to use the same proctoring session for the different sections

How It Works

Tests are resumed using the .start() method. If a test attempt has not been finalized (that is, .stop() has not been called), calling .start() resumes it. The following table summarizes the behavior:

.start() called previously for same testAttemptId?.stop() has been called?What happens
NoN/ANew Test Attempt is created
YesNoTest Attempt resumes (you will see previous and future violations in the report)
YesYesThe candidate sees a dialog saying the attempt is already complete. apMonitoringStarted doesn't fire.

Implementation

To support resume, run the same initialization code when the page loads. AutoProctor handles the rest:

// This code works for both new and resumed sessions
const apInst = new AutoProctor(credentials)
await apInst.setup(proctoringOptions)
apInst.start()  // Creates new or resumes existing session automatically

No special configuration is needed. As long as you use the same testAttemptId and haven't called .stop(), the session will resume seamlessly.

In a single-page app with several sections, keep the same instance running across sections rather than destroying and re-creating it.