My configuration:
- Windows 10
- npm 5.3.0
- node v8.4.0
- jasmine 2.8.0
- jasmine-spec-reporter 4.2.1
- protractor 5.1.2
Previously I have used standard jasmine logger for E2E tests output. Recently I installed jasmine-spec-reporter and output looks better. But now I have problem in TeamCity. After test execution in TeamCity I alway have "Process exited with code 0", even if some tests FAILED. With standard logger I didn't faced such problem. Could you please suggest how to solve this issue.
TeamCity output:
I/launcher - Running 1 instances of WebDriver
I/direct - Using ChromeDriver directly...
Jasmine started
1 LoginComponent
x should set focus to the Password field after incorrect password has been entered
- Expected false to be truthy.
at Function.CustomMatchers.expectToBeFocused (D:\TeamCity\BuildAgent\work\e2eng2\ng2\e2e\matchers\custom-matchers.ts:13:6)
at UserContext.<anonymous> (D:\TeamCity\BuildAgent\work\e2eng2\ng2\e2e\tests\login.e2e.ts:53:18)
at new ManagedPromise (D:\TeamCity\BuildAgent\work\e2eng2\ng2\node_modules\selenium-webdriver\lib\promise.js:1067:7)
at ControlFlow.promise (D:\TeamCity\BuildAgent\work\e2eng2\ng2\node_modules\selenium-webdriver\lib\promise.js:2396:12)
at TaskQueue.execute_ (D:\TeamCity\BuildAgent\work\e2eng2\ng2\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (D:\TeamCity\BuildAgent\work\e2eng2\ng2\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at asyncRun (D:\TeamCity\BuildAgent\work\e2eng2\ng2\node_modules\selenium-webdriver\lib\promise.js:2860:25)
**************************************************
* Failures *
**************************************************
1) LoginComponent should set focus to the Password field after incorrect password has been entered
- Expected false to be truthy.
Executed 1 of 9 specs (1 FAILED) (8 SKIPPED) in 10 secs.
I/launcher - 0 instance(s) of WebDriver still running
I/launcher - chrome #01 passed
Process exited with code 0
My protractor.conf.js
require('ts-node').register({
compilerOptions: {
noEmitHelpers: false
}
});
var helpers = require('./helpers');
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
baseUrl: 'http://localhost:8080/ng2/',
// use `npm run e2e`
specs: [
helpers.root('e2e/**/*.e2e.ts')
],
exclude: [],
framework: 'jasmine2',
allScriptsTimeout: 110000,
jasmineNodeOpts: {
defaultTimeoutInterval: 600000,
print: function() {}
},
directConnect: true,
capabilities: {
'browserName': 'chrome',
chromeOptions: {
args: [
'--start-maximized'
]
}
},
onPrepare: function() {
browser.ignoreSynchronization = true;
jasmine.getEnv().clearReporters();
jasmine.getEnv().addReporter(new SpecReporter({
displayStacktrace: 'all',
suite: {
displayNumber: true,
},
spec: {
displayPending: true,
displayStacktrace: true,
},
summary: {
displayDuration: true,
},
prefixes: {
successful: '+ ',
failed: 'x ',
},
}));
},
useAllAngular2AppRoots: true
};