简体   繁体   English

如何在cypress中运行测试之前手动查看网页?

[英]How to manually view the webpage before the tests run in cypress?

I have a webpage in which i want to test all the data and the top results, but before i am able to do that i am required to authenticate via a phone.我有一个网页,我想在其中测试所有数据和最佳结果,但在此之前,我需要通过电话进行身份验证。 The main problem is that I have to prove that i am not a robot via a captcha and also authenticate the phone with a phone call.主要问题是我必须通过验证码证明我不是机器人,并且还需要通过电话对手机进行身份验证。 All of this, as i believe, is done manually (we can't remove the captcha or the phone verification from the test process).我相信,所有这些都是手动完成的(我们无法从测试过程中删除验证码或电话验证)。 How do I first without the help of cypress login, and then set up all the tests?我如何在没有cypress的帮助下先登录,然后设置所有测试?

I had tried to login in between the tests, yet they couldn't continue after my interaction.我曾尝试在两次测试之间登录,但在我交互后他们无法继续。

All such login procedures should be disabled on test environments.在测试环境中应禁用所有此类登录程序 Simply because you have no control over them.仅仅是因为您无法控制它们。 The only result of trying to work around such GUI authentication schemes is you will make your tests flaky.尝试解决此类 GUI 身份验证方案的唯一结果是您会使测试变得不稳定。 Not even mentioning problems with different domains in Cypress.甚至没有提到 Cypress 中不同域的问题。

If there is such an authentication, it's much better to use an API, eg like described here for Auth0 .如果有这样的身份验证,最好使用 API,例如这里描述的 Auth0 But that requires some setup in Auth0, and then some Cypress code.但这需要在 Auth0 中进行一些设置,然后是一些 Cypress 代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM