2017-09-15 2 views
0

내 구성 :"프로세스 코드 0으로 종료"

  • 윈도우 10
  • NPM 5.3.0
  • 노드 v8.4.0
  • 자스민 2.8 0.0
  • 자스민 스펙 리포터 4.2.1
  • 끄는 5.1.2

이전에는 E2E 테스트 출력에 표준 재스민 로거를 사용했습니다. 최근 jasmine-spec-reporter가 설치되어 출력이 좋아졌습니다. 하지만 지금은 TeamCity에 문제가 있습니다. TeamCity에서 테스트를 실행 한 후에도 일부 테스트가 실패하더라도 "코드 0으로 프로세스가 종료되었습니다"라는 메시지가 표시됩니다. 표준 로거에서 나는 그런 문제에 직면하지 않았습니다. 이 문제를 해결하는 방법을 제안 해주십시오.

인 TeamCity 출력 :

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 

내 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 
}; 

답변

0

나는이 문제를 해결했다. 제 문제는 제가 다른 모든 기자들을 죽이는 것이 었습니다. 수정하려면이 행을 삭제하기 만하면됩니다.

jasmine.getEnv().clearReporters(); 
관련 문제