-
-
Notifications
You must be signed in to change notification settings - Fork 752
Closed
Labels
Description
Thanks for this project, I think it contains a lot of great ideas.
I used the WebdriverIO helper to run a few tests via both selenium standalone and phantomjs.
While working with it I noticed that codeceptjs does not return with a non-zero exit status when it cannot connect to selenium, i.e it skips executing steps and exits with status 0 as if everything was OK.
I think it should return with a non-zero exit status so for example CI environments can mark it as a failure.
codecept.json
{
"tests": "./*.test.js",
"timeout": 10000,
"output": "./output",
"helpers": {
"WebDriverIO": {
"url": "http://127.0.0.1:3011",
"browser": "firefox",
"host": "127.0.0.1",
"port": 4444
}
},
"bootstrap": false,
"mocha": {},
"name": "test"
}example.test.js
Feature('Example');
Scenario('test', (I) => {
I.amOnPage('/');
I.see('Hello');
});Output when selenium is running on localhost:4444:
$ codeceptjs run --steps
CodeceptJS v0.3.4
Test root is assumed to be /Users/attilab/tmp/example/test
Example --
test
• I am on page "/"
• I see "Hello"
✓ OK in 2027ms
OK | 1 passed // 2s
Exit status 0 here.
Output when selenium is NOT running anywhere:
$ codeceptjs run --steps
CodeceptJS v0.3.4
Test root is assumed to be /Users/attilab/tmp/example/test
Example --
test
Exit status 0 here as well.
timbru31, zatziky and benwinding