2017-12-09 17 views
1

어제와 오늘은 테스트를 실행하려고합니다 (Chimp /). 여기에 침팬지 구성이 있습니다 :침팬지 테스트가 작동하지 않고 오류가 발생했습니다 : 누락되었거나 유효하지 않은 'entry.level'

module.exports = { 
    // - - - - CHIMP - - - - 
    watch: false, 
    watchWithPolling: false, 
    sync: true, 

    // - - - - WEBDRIVER-IO - - - - 
    webdriverio: { 
    coloredLogs: true, 
    logLevel: 'silent', 
    screenshotPath: './tests/logs/screenshots', 
    waitforTimeout: 20000, 
    waitforInterval: 250 
    }, 

    // - - - - MOCHA - - - - 
    mocha: true, 
    mochaConfig: { 
    timeout: 20000, 
    }, 
    chai: true, 
    // path: './tests/spec', 
    path: './tests/spec/shop/configurator/products', 
    format: 'dot', 

// - - - - SELENIUM - - - - 
    browser: 'chrome', 
    platform: 'ANY', 
    name: '', 
    user: '', 
    key: '', 
    port: null, 
    host: null, 

    // - - - - METEOR - - - - 
    ddp: 'http://localhost:3000', 
    serverExecuteTimeout: 20000, 

    // - - - - PHANTOM - - - - 
    phantom_w: 1920, 
    phantom_h: 1280 
}; 

여기 첫 번째 테스트가 시작되기도 전에 보고서 출력이 실패합니다.

[chimp] Running... 


    Configurator @watch 
    1) "before all" hook 


    0 passing (10s) 
    1 failing 

    1) Configurator @watch "before all" hook: 
    Uncaught unknown error: cannot determine loading status 
from unknown error: missing or invalid 'entry.level' 

browserstack에서 실행하면 작동합니다. 나는 그것이, node_modules를 다시 설치, 침팬지 (0.50.2)를 업데이트 파이어 폭스로 실행하는 것이었다 해결하기 위해 노력 무엇

var browserstack = require('browserstack-local'); 
var bs_local = new browserstack.Local(); 
var bs_local_args = {/* ... */}; 

// starts the Local instance with the required arguments 
bs_local.start(bs_local_args, function() { 
    console.log("Started BrowserStackLocal"); 
}); 

module.exports = { 
    // - - - - CHIMP - - - - 
    watch: false, 
    watchWithPolling: false, 
    sync: true, 

    // - - - - WEBDRIVER-IO - - - - 
    webdriverio: { 
     baseUrl: 'http://localhost:3000', 
     coloredLogs: true, 
     desiredCapabilities: { 
      os: 'OS X', 
      os_version: 'El Capitan', 
      browser: 'Chrome', 
      browser_version: '58.0', 
      resolution: '1280x1024', 
      project: 'project', 
      build: 'build', 
      'browserstack.local': true 
     }, 
     logLevel: 'silent', 
     screenshotPath: './tests/logs/screenshots', 
     waitforTimeout: 50000, 
     waitforInterval: 250 
    }, 

    // - - - - MOCHA - - - - 
    mocha: true, 
    mochaConfig: { 
     timeout: 60001, 
    }, 
    chai: true, 
    path: './tests/spec', 
    format: 'dots', 

    // - - - - Screenshots - - - - 
    screenshotsOnError: true, 
    screenshotPath: './tests/logs/screenshots', 
    captureAllStepScreenshots: false, 
    saveScreenshotsToDisk: true, 
    saveScreenshotsToReport: false, 

    // - - - - SELENIUM - - - - 
    name: 'project', 
    browser: 'Chrome', 
    user: '...', 
    key: '...', 
    host: 'hub.browserstack.com', 
    port: 80, 

    // - - - - METEOR - - - - 
    ddp: 'http://localhost:3000', 
    serverExecuteTimeout: 30000, 

    // - - - - PHANTOM - - - - 
    phantom_w: 1280, 
    phantom_h: 1024 
}; 

는 아무것도 할 수 없습니다 : 여기 browserstack 구성입니다. 나는 다른 환경 (OS/우분투 16.04)에서 그것을 시도하고 결과는 동일합니다.

답변

1

침팬지는 셀레늄 구성을 숨 깁니다. 예를 들어 설치시 드라이버 바이너리를 다운로드합니다. 그러나 로컬 환경은 일반적으로 그보다 약간 더 복잡합니다. 먼저 확인해야 할 사항은 브라우저에서 사용자가주의하지 않고 버전을 업데이트했는지 확인하는 것입니다. 실제로는 browser-driver-chimp 버전을 잠그지 않은 경우에 이런 경향이 있습니다. 지금까지 클라우드에서 사용하는 것을 볼 수 있습니다 :

browser: 'Chrome', 
browser_version: '58.0', 

이 것으로 보입니다. 따라서 버전을 명시 적으로 잠그는 것이 좋습니다 (브라우저 업데이트를 사용 중지하는 것이 포함됩니다). 나는 또한 0.50.2에 침팬지 자체에 상당한 변화가 보이지 않습니다.

호환되는 드라이버 브라우저 버전을 확인하는 한 가지 방법은 최신 릴리스 노트 ChromeDriver을 검토하는 것입니다. 그래도 도움이되지 않는 경우 드라이버 또는 브라우저 쌍이 작동 할 때까지 다운 그레이드하십시오. 침팬지는 pinned to 2.28 인 반면 Chrome 버전에는 ChromeDriver v2.31 (2017-07-21)이 필요합니다.

몇 번이나 다시 추측 할 때까지 게임을 반복해야했습니다.