Here are my test results
The test timed out and can not show in cypress dashboard. How to set timeout for each test case in cypress?
Here are my test results
The test timed out and can not show in cypress dashboard. How to set timeout for each test case in cypress?
Please see Mocha timeouts,
Test-specific timeouts may also be applied, or the use of
this.timeout(0)
to disable timeouts all together.
it('should take less than 10 seconds', function() { // Note NOT arrow function
this.timeout(10000);
// test here
});
It works because Mocha is integral to Cypress.
Try these simple failing tests which pass Mocha done()
but never call it. They fail at the time specified by the timeout.
it('should take less than 500ms', function(done) {
this.timeout(500);
});
it('should take less than 2s', function(done) {
this.timeout(2000);
});
it('should take less than 5s', function(done) {
this.timeout(5000);
});
I don't think you can. As far as I can see in the docs, there're currently these timeouts you can set up: