正如您所提到的,它还没有得到官方支持(从 3.6.0 开始)。这是我对 hack 的看法(不使用 cookie 等来保持状态):// cypress/plugins/index.jslet shouldSkip = false;module.exports = ( on ) => { on('task', { resetShouldSkipFlag () { shouldSkip = false; return null; }, shouldSkip ( value ) { if ( value != null ) shouldSkip = value; return shouldSkip; } });}// cypress/support/index.jsfunction abortEarly () { if ( this.currentTest.state === 'failed' ) { return cy.task('shouldSkip', true); } cy.task('shouldSkip').then( value => { if ( value ) this.skip(); });}beforeEach(abortEarly);afterEach(abortEarly);before(() => { if ( Cypress.browser.isHeaded ) { // Reset the shouldSkip flag at the start of a run, so that it // doesn't carry over into subsequent runs. // Do this only for headed runs because in headless runs, // the `before` hook is executed for each spec file. cy.task('resetShouldSkipFlag'); }});一旦遇到故障,将跳过所有进一步的测试。输出将如下所示: