本页由英文自动翻译。

阅读英文版
Proxy Mail QA

审查多页注册表单

很多注册先要邮箱和密码,点下一步后再要姓名、公司、团队规模或套餐。每多一个页面,账号就多一个出错的地方。

更新于

先说我们的建议。 Proxy Mail QA 是我们做的,所以我们并不中立。对于跨多个页面的注册,我们建议用它在所有页面保持同一个测试账号,填入符合每个页面字段的值,并接收流程中任何一步发送的验证邮件。目前通过 AI 智能体或自动化测试效果最好。手动测试时,Proxy Mail QA for Chrome 填写第一个页面(带邮箱字段的那个),后续页面由你填写。Proxy Mail QA 从不点击下一步或提交,也不知道只有你的应用才有的字段该填什么,例如公司规模或“你是从哪里知道我们的?”:这些由你的智能体或测试填写。

多页注册为什么容易出问题

要检查什么

  1. 每个页面都属于同一个账号:最后一页的姓名与第一页一致。
  2. 后续页面的必填问题不能跳过,页面会说明原因。
  3. 返回后保留已输入的内容,返回后再点下一步不会创建第二个账号。
  4. 刷新后续页面,或离开后再回来,要么从用户离开的地方继续,要么干净地重新开始。半成品账号不能阻止该邮箱地址再次注册。
  5. 步骤指示(“第 2 步,共 3 步”)正确,并且不能通过输入后续页面的 URL 跳过步骤。
  6. 无论哪个页面发送验证邮件,它都只会到达一次。
  7. 已验证但未完成注册的用户可以登录,并会被带回未完成的页面。
  8. 后续页面的回答会被保留:它们会显示在账号上,或出现在使用它们的欢迎邮件中。

使用 AI 智能体

form_values 每次回答一个页面。在第一个页面上,它会创建一个新的测试地址,并返回邮箱、姓名、用户名、密码、出生日期和国家的值。在之后的每个页面上,智能体会用同一个 address 发送该页面的字段,因此账号会延续下去。它无法识别的字段会返回空值并附带说明,由智能体自己填写。

在 Qoder 中连接 Proxy Mail QA 后(Marketplace):

Sign up at https://staging.acme.dev/signup with Proxy Mail QA and go through every
screen of the sign-up. Start a run.
On the first screen, use form_values with the page's fields. On every later screen,
use form_values again with the same address. For fields it leaves empty, use these
answers: company size "11-50", role "Engineering", heard about us "Search".
Note the time before each Next, and when the verification email comes, finish it with
the code or link and carry on.
Then check the list below, finish the run and give me the report.

把上面的八项检查粘贴在提示词下方。在提示词中给出你自己字段的答案,可以让每次运行时保持一致。

在 Playwright 测试中

使用 proxymail-qa npm 包,在每个页面上调用 formValues,并把第一个页面的地址传给其余页面:

import { expect, test, type Locator } from '@playwright/test';
import { ProxyMailQA } from 'proxymail-qa';
const qa = new ProxyMailQA(); // reads PROXYMAIL_QA_API_KEY
// What the page says about each field, as formValues expects it.
const readFields = (form: Locator) =>
form.locator('input, select').evaluateAll((elements) =>
elements.map((el, i) => {
const input = el as HTMLInputElement & HTMLSelectElement;
input.dataset.field = String(i);
return {
id: String(i),
type: input.tagName === 'SELECT' ? 'select' : input.type,
name: input.name,
label: input.labels?.[0]?.textContent ?? input.getAttribute('aria-label') ?? '',
autocomplete: input.getAttribute('autocomplete') ?? '',
pattern: input.pattern || undefined,
minLength: input.minLength > 0 ? input.minLength : undefined,
maxLength: input.maxLength > 0 ? input.maxLength : undefined,
options: input.tagName === 'SELECT' ? Array.from(input.options, (o) => ({ value: o.value, label: o.text })) : undefined,
};
}),
);
const fill = async (form: Locator, values: { id: string; value: string | null }[]) => {
for (const { id, value } of values) {
if (value === null) continue;
const field = form.locator(`[data-field="${id}"]`);
if (await field.evaluate((el) => el.tagName === 'SELECT')) await field.selectOption(value);
else await field.fill(value);
}
};
test('one account across every screen of the sign-up', async ({ page }) => {
await page.goto('/signup');
const form = page.locator('form');
const first = await qa.formValues({ fields: await readFields(form) });
await fill(form, first.values);
const submitted = new Date();
await page.getByRole('button', { name: 'Continue' }).click();
await page.waitForURL('**/signup/about-you');
const second = await qa.formValues({ fields: await readFields(form), address: first.address });
await fill(form, second.values);
await form.getByLabel('Company size').selectOption('11-50'); // your app's own field
await page.getByRole('button', { name: 'Finish' }).click();
const { value: code } = await qa.waitForCode(first.address, { since: submitted });
await page.getByLabel('Code').fill(code);
await expect(page).toHaveURL(/welcome/);
expect((await qa.countEmails(first.address, { since: submitted, type: 'code' })).count).toBe(1);
await qa.deleteAddress(first.address);
});

同一个账号在每个页面上都会得到相同的姓名和出生日期,所以第 2 个页面上的失败是你的应用的问题,而不是测试数据的问题。

手动操作,使用 Proxy Mail QA for Chrome

在目前 Chrome Web Store 中的版本(0.8.0)里:

  1. 为你的网站开启扩展,然后在第一个页面上点击邮箱字段中的 Proxy Mail QA 按钮。它会在那里填写邮箱、姓名、用户名、出生日期和密码。
  2. 后续页面没有邮箱字段,所以不会出现填写测试账号的按钮。请手动输入,从 应用 中该测试账号的地址处复制姓名、用户名或出生日期,每一项都有一个复制按钮。
  3. 验证邮件到达后,其中的验证码或链接会显示在页面中,并带有 Fill 或 Open,与单页表单相同。

Proxy Mail QA 在这里不做什么

如果只看第一个页面,请参阅 审查简单的注册表单。

在你的下一次注册测试中试试

免费版,无需信用卡。创建一个地址,看着验证码或链接送达。

免费创建账号打开应用

你的应用是用 AI 工具构建的?选择你的工具

对本页有疑问?

可以用任何语言提问。文档可以立即回答,你也可以把问题发给 Proxy Mail QA 团队,他们会用英文回复。