Cypress 10 - 如何 运行 一次性完成所有测试?

Cypress 10 - How to run all tests in one go?

我曾经在以前的项目中使用 Cypress 9。 默认情况下,when 运行ning cypress open or cypress open --browser chrome used to 运行 all tests for all React components.

然而,我第一次在一个还没有端到端测试的项目上安装了 Cypress 10。我添加了测试规范,但我没有看到 运行 所有测试的任何选项。

看来我必须 运行 一项一项地进行测试,逐项单击。

任何人都可以建议我如何自动 运行 所有测试吗?

它已在 Cypress v10 中删除,这里是相关的更改说明

During cypress open, the ability to "Run all specs" and "Run filtered specs" has been removed. Please leave feedback around the removal of this feature here. Your feedback will help us make product decisions around the future of this feature.

表达您的不满的反馈页面是here


您可以为 运行 多个导入的规格创建一个“桶”规格。

我不能保证它与 v9“运行 所有测试”一样工作,但看不出有任何理由不这样做。

// all.spec.cy.js

import './test1.spec.cy.js'    // relative paths
import './test2.spec.cy.js'
...