【问题标题】:How do I test a text message (SMS) with testRigor?如何使用 testRigor 测试短信 (SMS)?
【发布时间】:2021-08-07 22:44:14
【问题描述】:

我正在使用 testRigor,我们的系统会发送短信。如何测试是否收到短信?

【问题讨论】:

    标签: testing sms testrigor


    【解决方案1】:

    可以使用Twilio。您可以转到 https://www.twilio.com/ 创建一个 Twilio 帐户并从他们那里获取您的第一个电话号码。他们的免费版本甚至可以实现。 完成后,您可以转到 Twilio 仪表板并获取 Account SID、Auth Token 和电话号码。然后您可以转到 testRigor 并在 Twilio 部分下的 Settings/Integration 中指定这 3 个参数。 完成此操作后,您可以在系统上使用从 Twilio 获得的电话号码,然后您将能够使用以下 testRigor 代码(假设您从 Twilio 获得的电话号码是 +12345678902):

    check that sms to "+12345678902" is delivered
    

    例如,2 因素身份验证登录测试可能如下所示:

    click "Sign in"
    enter "jacob" into "Username"
    enter "jacobs-secure-password" into "Password"
    click "Verify me"
    check that sms to "+12345678902" is delivered and matches regex "Code\:\d\d\d\d" and save it as "sms"
    extract value by regex "(?<=Code\:)[0-9]{4}" from "sms" and save it as "confirmationCode"
    enter saved value "confirmationCode" into "code"
    click "Continue to Login"
    check that page contains text "Welcome, Jacob!"
    

    【讨论】:

      猜你喜欢
      • 2011-08-10
      • 2022-11-11
      • 2010-10-09
      • 2021-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-24
      • 2019-06-02
      相关资源
      最近更新 更多