What are you trying to achieve?
Any error in After when an error occurs in the Scenario should just fail.
What do you get instead?
Codecept hangs and is stuck indefinitely
Provide console output if related. Use --verbose mode for more details.
Test --
[1] Starting recording promises
Emitted | suite.before ([object Object])
bug-test
Emitted | test.before ([object Object])
Emitted | test.start ([object Object])
Emitted | step.before (I am on page "https://www.google.com")
Emitted | step.after (I am on page "https://www.google.com")
Emitted | step.before (I see "hello")
Emitted | step.after (I see "hello")
Emitted | step.start (I am on page "https://www.google.com")
• I am on page "https://www.google.com"
> [Url] https://www.google.com/
Emitted | step.passed (I am on page "https://www.google.com")
Step finished in 0.873 sec
Emitted | step.finish (I am on page "https://www.google.com")
Emitted | step.start (I see "hello")
• I see "hello"
[1] Error | Error
Emitted | step.failed (I see "hello")
Step finished in 0.005 sec
Emitted | step.finish (I see "hello")
[1] Error | Error
[1] Starting <teardown> session
Emitted | test.failed ([object Object])
> Screenshot is saving to /xxx/output/runs/image/2018/07/2018-07-18_13-39-6021-B1wuHQTQX.failed.png
Emitted | test.finish ([object Object])
[1] <teardown> Stopping recording promises
> Screenshot is saving to /xxx/output/bug-test.failed.png
✖ FAILED in 1528ms
Emitted | hook.start ([object Object])
[2] Starting recording promises
Emitted | step.before (I see "hello")
Emitted | step.after (I see "hello")
Emitted | step.start (I see "hello")
• I see "hello"
[2] Error | Error
Emitted | step.failed (I see "hello")
Step finished in 0.003 sec
Emitted | step.finish (I see "hello")
[2] Error | Error
[2] Stopping recording promises
Provide test source code if related
Feature('Test');
Scenario( 'bug-test', (I) => {
I.amOnPage('https://www.google.com');
I.see('hello');
});
After((I) => {
I.see('hello');
});
Details
- CodeceptJS version: version "1.3.2"
- NodeJS Version: v9.11.1
- Operating System: System Version: macOS 10.13.6 (17G65)/ Darwin 17.7.0
- puppeteer@^1.6.0:
- Configuration file:
{
"tests": "./*_test.js",
"timeout": 10000,
"output": "./output",
"helpers": {
"Puppeteer": {
"url": "https://www.google.com"
}
},
"include": {},
"bootstrap": false,
"mocha": {},
"name": "random"
}
What are you trying to achieve?
Any error in
Afterwhen an error occurs in theScenarioshould just fail.What do you get instead?
Codecept hangs and is stuck indefinitely
Details