Playwright · Senior · Question 13 of 77

How can E2E tests handle two-factor authentication with a TOTP app?

Show the answer

Correct answer: Store a test TOTP secret and generate codes in the test

Explanation

With the test account's secret, a library like otpauth computes the current code, so the flow is tested end to end.

Further reading

Problem with a question

Playwright · Senior · question 13

Test yourself

Take the Playwright · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz