cypress - 在 Cypress 中仅运行失败的测试用例

标签 cypress

在运行 Cypress 脚本时,有些情况会失败。我只想运行那些失败的案例来再次运行。
如何在 Cypress 中仅运行失败的测试用例?

最佳答案

只要它没有直接集成到 Cypess 中,你就可以使用类似 cypress-run 的 npm 包。npm install cypress-run --save然后在 package.json 中编辑然后运行命令并替换命令cypress run通过例如 cypress-run --retries 4 ,这将重试失败的测试 4 次

关于cypress - 在 Cypress 中仅运行失败的测试用例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59728333/

相关文章:

javascript - Cypress 与 cy.wait 的良好实践

cypress - Cypress 中的 Trigger 与 Should

javascript - 等待元素没有类 - 然后其他元素在 Cypress 中消失

testing - 在fullcalendar上拖放cypress测试的问题

javascript - 如何从 Cypress 的测试文件中抽象出公共(public)功能

javascript - Cypress :cy.get ("a").find ("b") 和 cy.get ("a b") 之间的任何区别

javascript - 如何从 div 类 Cypress 中获取文本

cypress - 在 Cypress 中,如何等待页面加载?

testing - 获取柏树类列表的长度?

vue.js - cy.clear() 未正确清除输入字段 - Cypress