我有一个包含两个以上测试用例的套件。使用 Cypress,当其中一个测试失败时,如何从测试套件的开头重试所有测试?
我尝试使用retries赛普拉斯的选项,但它只是重试单个失败的测试,而不是套件开头的所有测试。有人知道如何做到这一点吗?请帮我。
describe('An user with an assigned report', {
retries: {
'runMode': 2,
'openMode': 2
}
}, () => {
before(() => {
const config = Cypress.env()
cy.logout()
cy.login(username, password)
})
after(() => {
cy.logout()
})
it('should be able to add a comment', () => {
cy.openReportWriterRightPanel()
})
it('should be able to add Incident Overview details', () => {
// Click 'Incident Overview' and fill out form.
cy.findByLabelText('currently active entity').click()
})
}
Run Code Online (Sandbox Code Playgroud)