2016-07-01 3 views
0

내가 일어 났을하고 항상 E2E 시험 사용 각도기를 실행하려고 오늘과 오류 메시지가 표시 Resseting : 각도기 오류 처음 - Jasmine spec timed out. WebDriver 제어 흐름

'재스민 사양

시간이 초과되었습니다. Reweting WebDriver Control Flow '를 참조하십시오.

항상과 동일한 사양을 사용하기 전에 이 발생하지 않았 음을 지적하고 싶습니다. 그것은 나에게 어떤 의미가 없습니다. 의견이 있으십니까? 내 설정을 공유 할 수 있습니다 :

var HtmlReporter = require('protractor-html-screenshot-reporter'); 

var today = new Date(), 
timeStamp = today.getMonth() + 1 + '-' + today.getDate() + '-' + today.getFullYear() + '-' + today.getHours() + 'h-' + today.getMinutes() + 'm'; 

var reporter = new HtmlReporter({ 
baseDirectory: '../test_out/e2e', 
docTitle: 'Protractor Reporter', 
docName: 'protractor-tests-report-' + timeStamp + '.html', 
takeScreenShotsOnlyForFailedSpecs: false 
}); 

exports.config = { 

"allScriptsTimeout": 15000, 

seleniumPort: 4444, 
seleniumAddress: 'http://localhost:4444/wd/hub', 

// Capabilities to be passed to the webdriver instance. 
capabilities: { 
    'browserName': 'chrome', 
    chromeOptions: { 
     args: [ 
     '--disable-extensions' 
     ] 
    } 
}, 

//A base URL for your application under test. 
//Calls to protractor.get() with relative paths will be prepended with this. 
//baseUrl: 'http://localhost/', 
baseUrl: 'https://federation-sts-stage.accenture.com/adfs/ls?wa=wsignin1.0&wtrealm=https%3a%2f%2frecruitmentdocuments.ciostage.accenture.com%2f&wctx=rm%3d1%26id%3dpassive%26ru%3d%252f&wct=2016-03-09T13%3a48%3a44Z&RedirectToIdentityProvider=urn%3afederation%3aaccenture%3astage', 

frameworks: [ 
    'jasmine', 
    'jasmine-matchers' 
], 

//An array of file patterns that point to your spec files. 
//Patterns are relative to the current working directory when Protractor is started up. 
specs: [ 
    //"../../../../../ng-app/test/javascript/e2e/**/*.scenario.js" 
    "../../../../../ng-app/test/javascript/e2e/**/login.scenario.js", 
    "../../../../../ng-app/test/javascript/e2e/**/assignTask.scenario.js" 
    //"../../../../../ng-app/test/javascript/e2e/**/cancelTask.scenario.js", 
    //"../../../../../ng-app/test/javascript/e2e/**/search.scenario.js", 
    //"../../../../../ng-app/test/javascript/e2e/**/uploadDocument.scenario.js", 
    //"../../../../../ng-app/test/javascript/e2e/**/openDocument.scenario.js" 
    //"../../../../../ng-app/test/javascript/e2e/**/createOffer.scenario.js", 
    //"../../../../../ng-app/test/javascript/e2e/**/shareLink.scenario.js" 
    //"../../../../../ng-app/test/javascript/e2e/**/createOPR.scenario.js" 
], 

//Separate your tests in various test suites: 
//protractor protractor.conf.js --suite homepage 
suites: { 
    login: '../../../../../ng-app/test/javascript/e2e/**/login.scenario.js', 
    assignTask: '../../../../../ng-app/test/javascript/e2e/**/assignTask.scenario.js'   
    //cancelTask: '../../../../../ng-app/test/javascript/e2e/**/cancelTask.scenario.js', 
    //search: '../../../../../ng-app/test/javascript/e2e/**/search.scenario.js', 
    //uploadDocument: '../../../../../ng-app/test/javascript/e2e/**/uploadDocument.scenario.js', 
    //openDocument: '../../../../../ng-app/test/javascript/e2e/**/openDocument.scenario.js' 
    //createOffer: '../../../../../ng-app/test/javascript/e2e/**/createOffer.scenario.js', 
    //shareLink: '../../../../../ng-app/test/javascript/e2e/**/shareLink.scenario.js' 
    //createOPR: '../../../../../ng-app/test/javascript/e2e/**/createOPR.scenario.js' 
}, 

onPrepare: function() { 
    //Set window size before starting the tests 
    //browser.driver.manage().window().setSize(320, 568); 
    browser.driver.manage().window().maximize(); 

    var SpecReporter = require('jasmine-spec-reporter'); 
    jasmine.getEnv().addReporter(new SpecReporter({ 
     displayStacktrace: 'all',  // display stacktrace for each failed assertion, values: (all|specs|summary|none) 
     displayFailuresSummary: true, // display summary of all failures after execution 
     displayPendingSummary: true, // display summary of all pending specs after execution 
     displaySuccessfulSpec: true, // display each successful spec 
     displayFailedSpec: true,  // display each failed spec 
     displayPendingSpec: false, // display each pending spec 
     displaySpecDuration: true, // display each spec duration 
     displaySuiteNumber: false, // display each suite number (hierarchical) 
     colors: { 
      success: 'green', 
      failure: 'red', 
      pending: 'yellow' 
     }, 
     prefixes: { 
      success: '✓ ', 
      failure: '✗ ', 
      pending: '* ' 
     }, 
     customProcessors: [] 
    })); 

    //// Add a screenshot reporter and store screenshots to `/tmp/screnshots`: 
    jasmine.getEnv().addReporter(reporter); 
}, 



// Options to be passed to Jasmine-node. 
jasmineNodeOpts: { 
    onComplete: null,     //function to call before the driver quits 
    showColors: true,     //provide colored output during spec runs 
    defaultTimeoutInterval: 60000, 
    isVerbose: true,     //provide verbose output during spec runs 
    includeStackTrace: true   //include a stack trace on errors 
}, 
}; 
+0

재스민 defaultTimeoutInterval을 늘리십시오. 2 * 60 * 1000, 뭔가가 개발자 측에서 변경 될 수 있습니다. 이 오류는 블록을 실행하는 데 시간이 걸리며 정의 된 시간 인 60 초를 초과 한 경우에 발생합니다. – tyaga001

답변

0

귀하의 allScriptsTimeout 15 초로 설정하고 jasmine defaultTimeoutInterval 60 초로 설정됩니다. 즉, 일부 비동기 호출이 15 초보다 오래 걸리거나 'it'문이 60 초 이상 실행중인 경우 jasmine은 테스트를 중지하고이 오류 메시지 Jasmine spec timed out을 발생시킵니다.

테스트가 합법적으로 실행 속도가 느려지거나 (테스트를 다시 통과 시키거나 응용 프로그램의 성능을 높이기 위해 시간 초과 간격을 늘리는 등) 응용 프로그램이 변경되었거나 테스트가 어딘가에 걸려 있고 붙어있어.

0

테스트가 갑자기 작동하지 않는 문제가 발생하면 크롬 버전 & 크롬 드라이버간에 불일치가 발생하는 경우가 있습니다. Chrome은 자동 업데이트를 수행하며 기본적으로 webdriver는 아닙니다.

당신은 버전을 표시해야한다고, 당신의 chromedriver 실행과 개방을 찾아 확인할 수 있습니다 드라이버 버전

확인.
지금 chromedriver의 현재 버전이 크롬 버전으로 작동하는지 here 확인해야합니다 Chrome driver version

를 참조하십시오. 그렇지 않은 경우 :

업데이트 chromedriver

당신은 단순히 올바른 버전으로 chromedriver 실행 파일을 덮어 쓸 수 있습니다.

webdriver 관리자를 사용하면 chromedriver가 자동으로 업데이트됩니다.

This NPM package will auto update the needed drivers

관련 문제