[英]Why does Cypress test in GUI(cypress open) pass but fails in command line(cypress run) even though I using chrome browser?
I'm writing a test for 4 endpoints and I can see it's successfully completed when trying with cypress open command.我正在为 4 个端点编写测试,并且在尝试使用 cypress open 命令时可以看到它已成功完成。 However, If I try to run cypress run command, I see a timeout issue.但是,如果我尝试运行 cypress run 命令,我会看到超时问题。 Is there any difference between these 2 commands?这两个命令有什么区别吗?
Try running below commands:尝试运行以下命令:
cypress run -C <path to your config file>
and和
cypress open -C <path to your config file>
In the config mention the browser else it will run in electron browser在配置中提及浏览器,否则它将在 electron 浏览器中运行
See in your report if the test are run in same browser else pass --browser explicitly for both the commands如果测试在同一个浏览器中运行,请在报告中查看,否则为这两个命令显式传递 --browser
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.