gpt4 book ai didi

cypress - 如何在柏树中登录文件?

转载 作者:行者123 更新时间:2023-12-05 08:12:45 24 4
gpt4 key购买 nike

我想记录流程的每一步,例如:完成注册、打开用户仪表板、编辑用户配置文件。这怎么能通过 Cypress 来实现。我尝试使用 node.js 进行此操作,但是当 cypress 在浏览器中运行时,我无法使用 node.js 创建文件,而且我尝试使用 cy.writefile 替换我在文件中写入的先前文件。有没有办法做到这一点 ???在此之后,我确实想将此日志发送到电子邮件。

最佳答案

欢迎来到 Stack Overflow。如果你在像 CircleCI 这样的 CI 服务器上运行 Cypress,它可以记录你的输出。

还有一个--record 选项,它可以为您保存 session 的详细信息。

Cypress can record your tests running and make them available in our Dashboard.

Recorded tests allow you to: See the number of failed, pending and passing tests. Get the entire stack trace of failed tests. View screenshots taken when tests fail and when using cy.screenshot(). Watch a video of your entire test run or a clip at the point of test failure.

您可以在此处阅读有关录制 session 的更多信息 https://docs.cypress.io/guides/guides/continuous-integration.html#Recording-tests-in-CI

关于cypress - 如何在柏树中登录文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52809797/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com