英文:
How to automate tests which requires OKTA OTP verification
问题
如何自动化需要OKTA OTP验证的测试?
用例:
- 用户访问互联网银行网站
- 用户输入有效的ID和密码
- 网站将请求一个OTP
- 用户在手机上收到一个OTP
- 用户输入OTP
- 登录成功
我将使用一个自动化框架来自动化这个用例。
如何自动检索OKTA OTP并自动化步骤3和4?
是否有任何插件/工具/实用程序可以通过API或其他方式读取OTP?
我将使用TOSCA或可能使用Selenium来自动化这个用例。
英文:
How to automate tests which requires OKTA OTP verification?
Use case:
- User will the internet banking website
- User will enter valid ID and password
- Website will request for an OTP
- User receives an OTP on mobile phone
- User enters the OTP
- 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。但你可以探索以下选项:
-
OKTA API:检查一下OKTA是否提供API,允许你以编程方式获取OTP。
-
手机模拟器:使用手机模拟器或模拟器,比如Appium,来自动化与手机的交互。通过Appium,你可以模拟接收OTP并在你的自动化框架中以编程方式提取它。
-
虚拟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:
-
OKTA API: Check if OKTA provides an API that allows you to programmatically retrieve the OTP.
-
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.
-
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论