如何自动化需要OKTA OTP验证的测试

huangapple go评论55阅读模式
英文:

How to automate tests which requires OKTA OTP verification

问题

如何自动化需要OKTA OTP验证的测试?

用例:

  1. 用户访问互联网银行网站
  2. 用户输入有效的ID和密码
  3. 网站将请求一个OTP
  4. 用户在手机上收到一个OTP
  5. 用户输入OTP
  6. 登录成功

我将使用一个自动化框架来自动化这个用例。
如何自动检索OKTA OTP并自动化步骤3和4?

是否有任何插件/工具/实用程序可以通过API或其他方式读取OTP?

我将使用TOSCA或可能使用Selenium来自动化这个用例。

英文:

How to automate tests which requires OKTA OTP verification?

Use case:

  1. User will the internet banking website
  2. User will enter valid ID and password
  3. Website will request for an OTP
  4. User receives an OTP on mobile phone
  5. User enters the OTP
  6. Login successful

I will be using an automation framework to automate this use case.
How do I automatically retrieve the OKTA OTP and automate step 3 & 4?

Is there any plugin / Tool / Utility which will allow me to read the OTP via API's or by any other means?

I will be using TOSCA or maybe Selenium to automate this use case.

答案1

得分: 0

尽管到目前为止,自动化领域仍然存在一些进展不多的领域,比如验证码/条形码/OTP。但你可以探索以下选项:

  1. OKTA API:检查一下OKTA是否提供API,允许你以编程方式获取OTP。

  2. 手机模拟器:使用手机模拟器或模拟器,比如Appium,来自动化与手机的交互。通过Appium,你可以模拟接收OTP并在你的自动化框架中以编程方式提取它。

  3. 虚拟OTP生成:如果在你的测试环境中无法或难以获取真实的OTP,你可以为自动化测试创建一个虚拟OTP生成机制。这可以涉及在你的测试环境中生成和存储一个唯一的OTP值,可以在自动化过程中使用。

关于自动化框架的选择,TOSCA和Selenium都可以处理这些任务。

英文:

Though till the time this is still some area which does not have much progress in automation side like Captcha/Barcode/OTP. But you can explore the following options:

  1. OKTA API: Check if OKTA provides an API that allows you to programmatically retrieve the OTP.

  2. Mobile Phone Emulator: Use a mobile phone emulator or simulator, such as Appium, to automate the interaction with the mobile phone. With Appium, you can simulate the receipt of the OTP and extract it programmatically within your automation framework.

  3. Mock OTP Generation: If retrieving the real OTP is not possible or challenging in your testing environment, you can create a mock OTP generation mechanism specifically for automation testing. This could involve generating and storing a unique OTP value within your test environment that can be used during the automation process.

Regarding the choice of automation frameworks, both TOSCA and Selenium can handle these tasks.

huangapple
  • 本文由 发表于 2023年6月8日 10:48:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76428285.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定