Teachers can use the iOS feature Guided Access to lock students into the app until they have finished their test.
(1) Go to: Settings > General > Accessibility > Learning > Guided Access.
(2) Set Guided Access to ON.
(3) Set Accessibility Shortcut to ON.
(4) Follow the instructions.
(5) Be sure the student does not see the four digit passcode.
(6) After the test is finished, use the triple click as described in the instructions and turn off Guided Access.