Test GitLab Email OTP in an isolated instance first, then verify delivery to a controlled test inbox and complete the login flow. This approach is for administrators, developers, and QA teams testing their own GitLab Self-Managed or GDK environments; GitLab.com’s rollout does not establish the default behavior of a self-managed instance.
Who this guide is for: GitLab Self-Managed administrators checking instance configuration and login paths.
QA engineers validating code delivery and the completed sign-in flow for isolated test accounts.
Developers distinguishing captured message content from actual delivery and successful authentication.
Last updated October 26, 2026; checked against GitLab’s official Email OTP, account verification, two-factor authentication, settings API, troubleshooting, and sign-in restriction documentation. The documentation links below identify which conclusions apply to GitLab.com, account behavior, or instance-level configuration.
Test scope and evidence
Before running a test, write down what it needs to prove. “The code email works” can mean several different things: the application generated a message, a mail system accepted or delivered it, the user entered a valid code, or the application established an authenticated session. These are separate observations. A captured message proves only that content reached the capture tool; it does not prove delivery to an external inbox or successful login.
Keep the test inside an instance owned or administered by the team. Use an isolated, non-production account and a controlled test inbox. Do not test by trying to circumvent MFA, and do not use a disposable address for production administrators, work accounts, or accounts that need long-term recovery.
GitLab’s documentation describes a GitLab.com Email OTP rollout beginning in 2026. Its user guidance also says MFA is required for username-and-password sign-in to GitLab.com from April 2026, and explains when Email OTP may apply if no other factor is configured. Those cloud-service rules are not a statement that Email OTP is enabled by default on every GitLab Self-Managed or GDK instance. Check the GitLab Email OTP development documentation and official two-factor authentication guidance for the current scope and behavior.
A useful test record separates the evidence into distinct items:
- Instance context: deployment type, GitLab version, and the environment being tested.
- Configuration evidence: the relevant settings as they appear in that instance, including any account verification or sign-in restrictions that affect the path.
- Message evidence: a captured message or a controlled inbox record tied to the test account and request.
- Application evidence: whether the code was accepted and whether the expected authenticated session was created.
This separation makes failures easier to diagnose. For example, an application can generate the expected email while the delivery system rejects it. Likewise, an email can arrive correctly while the test account follows a different sign-in path because of its existing authentication configuration.
Administrator responsibilities: verify instance boundaries
An administrator should establish which product and environment are under test before changing settings. GitLab.com is a hosted service with its own rollout and account policies. Self-Managed instances have administrator-controlled configuration. GDK is a development environment, so its mail handling and available settings can differ from a deployed instance. A successful test in one environment is evidence about that environment, not a guarantee about the others.
Check the official documentation for the version being tested, then record the actual configuration in the instance. GitLab’s application settings API documentation is a reference for application settings; it should not be treated as proof that a specific Email OTP option is available or enabled in every version. Confirm the relevant option and its prerequisites against the applicable documentation and the instance itself. If the UI, API, and documentation appear inconsistent, capture the version and observed values rather than assuming the cloud configuration applies.
Keep Email OTP distinct from related email and authentication features:
- Email OTP is a code-based sign-in step where the documented conditions make it available.
- Registration confirmation checks an address as part of account creation. It does not by itself prove that an existing account can complete an OTP challenge.
- Account email verification concerns whether an account’s email address is verified. GitLab documents this separately in its account email verification guidance.
- TOTP and WebAuthn are other authentication factors. Their enrollment and sign-in behavior should not be used as a substitute for testing the Email OTP path.
- Sign-in restrictions may change which accounts or sign-in methods can access an instance. Review the Self-Managed sign-in restrictions documentation when those controls are in scope.
A scenario illustrates why this distinction matters. An administrator sees an account confirmation message in a local capture tool and concludes that Email OTP is ready. The capture shows that a message reached the tool, but it does not establish that the account entered an OTP challenge, that the code was accepted, or that a session was created. The test needs separate observations for each claim.
Developer responsibilities: track application behavior
A developer should tie each sign-in attempt to the correct test account and test run. Start with the normal password login for that isolated account in the target instance. Observe whether the application presents an email-code step. If it does not, record the path that occurred and check the instance configuration and account state; do not force a different outcome by bypassing authentication controls.
When the OTP step appears, check that the message corresponds to the same account and request being tested. Avoid copying a code from an earlier run or using a message that cannot be tied to the current attempt. Store evidence in a way that does not expose the code more widely than necessary. For an automated test, retain only what is needed to support the assertion, and keep test secrets out of source control and ordinary logs.
Treat the result as a small state machine rather than one pass/fail statement:
- Challenge shown: the login path reached an email-code prompt.
- Message observed: the test mail system or controlled inbox received the expected message.
- Code submitted: the account submitted a code associated with the current test.
- Application response: the instance accepted or rejected the submission.
- Session result: the application did or did not establish the expected signed-in state.
A local mail catcher can make message inspection convenient during development. It is not evidence that an external mail provider accepted or delivered the email. Conversely, a message in a controlled inbox does not prove the application accepted the code. Keep those boundaries in the test report so a reviewer can tell whether a failure is in message generation, transport, code handling, or session creation.
When a test resends a code, verify the behavior from the relevant GitLab documentation and the observed instance. Do not infer an expiration period, resend limit, delivery speed, or old-code policy from a single run. The official two-factor troubleshooting guidance can help identify documented user-side issues, but it does not replace verification of the Self-Managed instance’s own settings and mail path.
QA responsibilities: choose the right evidence
QA should validate the complete behavior required by the acceptance criteria, not just the presence of an email. Use a controlled inbox assigned to the isolated test account. Confirm that the message is associated with the current login attempt, that the account can submit the received code, and that the expected signed-in state follows. Record each result separately so the report identifies what passed and what remains unproven.
| Test setup | What it can establish | What it cannot establish |
|---|---|---|
| Local mail capture in GDK or a development setup | The application emitted message content that reached the capture tool | Delivery to an external inbox or successful sign-in |
| Controlled test inbox | The message reached that inbox and can be inspected in context | That the code was accepted or a session was created |
| Full isolated-instance login test | The observed challenge, message, code submission, and resulting session for that tested account | GitLab.com rollout status or behavior on another instance |
How should a team prepare a GitLab Email OTP test environment?
Use an instance the team owns or is authorized to test, plus a non-production account and a controlled inbox. Confirm the deployment type and version, document the relevant settings, and decide whether the test is meant to validate challenge generation, message receipt, or the complete login path. Avoid real employee accounts: they can receive test messages, contaminate audit trails, and expose personal information in captured mail.
For an acceptance test, set the expected result before running it. If the requirement is “message generated,” a local capture may be sufficient. If the requirement is “mail delivered,” the evidence must come from the controlled receiving system. If the requirement is “user can sign in,” the test must also establish that the code was accepted and the session reached the intended state.
Decision branches for test setup
Choose the least expansive setup that proves the acceptance criterion:
- If the test only checks message content or template rendering, use a local capture tool in the development environment. Record that the evidence stops at capture.
- If the test checks delivery, use a controlled inbox that the test team can inspect. Do not report a captured message as delivered mail.
- If the test checks the complete login flow, run the password sign-in, OTP challenge, controlled receipt, code submission, and session assertion against the isolated target instance.
- If the test must establish GitLab.com behavior, use the official GitLab.com guidance and an authorized test account. A Self-Managed result cannot establish cloud rollout status.
- If the target is a Self-Managed instance, use its own version-specific documentation and observed configuration. Do not copy a GitLab.com assumption into the instance’s test plan.
- If the account is important, production-facing, or needs dependable recovery, do not use a disposable mailbox. Use an appropriate long-term address and the organization’s approved authentication and recovery process.
This is where the choice of test address matters. A temporary inbox can be useful for a short-lived, isolated QA account, but its suitability depends on the instance accepting the address and on the team being able to retrieve the test message when needed. It is not a substitute for controlled test infrastructure when the test needs durable records, repeatable access, or a long-term recovery channel. The guide to choosing an inbox for different use cases outlines those trade-offs; the comparison of a temporary address and a spare mailbox can help teams decide which fits a test account.
QA responsibilities: investigate missing messages
What should be checked first when a test inbox receives no GitLab code?
Start by confirming that the account actually reached an Email OTP challenge in the intended instance. Then check the test account’s address, the instance’s relevant mail and sign-in configuration, the mail capture or delivery path, and the test run’s message records. A missing message is not enough to conclude that OTP is disabled: the account may have taken a different authentication path, or the message may have failed before reaching the receiving system.
Check the evidence in layers rather than changing multiple settings at once:
- Challenge state: confirm that the application presented the email-code step for this account. If it did not, inspect the account’s authentication state and the instance’s documented configuration.
- Message generation: in a local setup, see whether the message appeared in the capture tool. If it did not, investigate the application’s mail configuration and the recorded request.
- Transport and receipt: if a message was generated, examine the configured delivery path and the controlled inbox’s available records. A local capture cannot prove the next transport hop.
- Message association: check that the message belongs to the current test account and run, not an earlier attempt or a different account.
- Code and session result: if the email arrived, separately record the submission response and whether the expected authenticated state followed.
GitLab’s two-factor troubleshooting page provides documented troubleshooting context for authentication problems. Use it alongside the instance’s own configuration and the available mail evidence. Avoid claiming that a code was delayed, expired, or invalid for a particular reason unless the logs or documentation support that conclusion.
Security and release responsibilities: preserve a useful record
A release reviewer needs enough context to reproduce the test without collecting unnecessary personal data or secrets. Record the GitLab version, deployment type, relevant configuration observations, test-account identifier, the type of mail evidence, the application’s response, and the final session result. Redact one-time codes from broadly shared reports. Keep message bodies and test credentials only as long as required by the team’s test and retention policy.
Do not use a successful Self-Managed test to claim that GitLab.com has the same rollout state. Do not generalize a result from GDK to another deployed instance. Each finding should name the tested environment and the exact claim it supports: generated, received, accepted, or signed in. This makes the evidence defensible when the instance configuration changes or a later run behaves differently.
After testing, remove temporary credentials, test accounts, and retained message data according to the team’s environment-cleanup policy. Recheck the relevant official documentation when GitLab changes Email OTP configuration, rollout guidance, code handling, or testing instructions. The current evidence is valid for the environment and configuration actually tested; it is not a standing guarantee for later versions or other instances.
For an isolated QA account that needs a short-lived receiving address, a temporary inbox can be one controlled test option—not a shortcut for protecting an important GitLab account. Check the CloneInbox access page to review the service’s available inbox options and limitations before using it in a test. CloneInbox is intended for quick, no-registration use where available; the test team should still confirm that its chosen address works with its own instance and retain a durable mailbox for accounts that need ongoing access or recovery.
Give shopping updates their own address
Use a CloneInbox forwarding alias for ongoing everyday updates, and choose temporary email only when you need a short-term verification address.