A government agency web test logs in with a token, then fails halfway through the scripted transaction when that token expires. The real application refreshes the token and continues. What should the test do?
Select an answer to reveal the explanation.
Short Explanation
A badge that dies halfway down the hall is useless unless you get a fresh one the way a real visit works. The agency application refreshes its token and keeps going, so your test has to refresh the same way. The trap is switching auth methods, running with no credentials, or moving the check to a network-loss test that does not log in.
Full Explanation
The application obtains a new token when the current one expires and then finishes the transaction. A synthetic web test that stops at expiry is not walking the same authentication path, so it should refresh the token during the transaction the same way the application does. Replacing the agency token flow with a different authentication method than the application uses would measure a login the agency does not offer. Running the whole transaction with no credentials so nothing can expire removes authentication instead of reproducing it, and a failure there would say nothing about the token refresh. Moving the check to a network-loss test that does not log in abandons the transaction entirely, because that test never presents a token. Exam caveat: a mid-transaction failure can be the test script falling out of step with the application, not an outage of the portal. Operational check: compare the script steps with a real session and confirm the test requests a fresh token at the same point the application does, then continues the remaining steps.