2015-07-30 2 views
1

Я на самом деле пытаюсь настроить транспортир и огурец для запуска тестов, и на самом деле они, кажется, запускаются несколько раз. Вот результат моей команды NODE_ENV=test protractor test/protractor.conf.coffeeИспытания, обработанные несколько раз с транспортиром и огурцом

Starting selenium standalone server... 
[launcher] Running 1 instances of WebDriver 
Selenium standalone server started at http://192.168.1.14:36187/wd/hub 

Feature: 

    Scenario:         # test/integration/features/001-i-can-see-brands.feature:7 
    When I open the uri "#/"     # test/integration/features/001-i-can-see-brands.feature:5 
    Then I should be on the uri "#/brand"  # test/integration/features/001-i-can-see-brands.feature:8 
    And I should see several css "brand-card" # test/integration/features/001-i-can-see-brands.feature:9 
    And I should see several css "brand-card" # test/integration/features/001-i-can-see-brands.feature:9 
    Then I should be on the uri "#/brand"  # test/integration/features/001-i-can-see-brands.feature:8 


1 scenario (1 passed) 
5 steps (5 passed) 


1 scenario (1 passed) 
5 steps (5 passed) 
2 scenarios (2 passed) 
5 steps (5 passed) 


1 scenario (1 passed) 
5 steps (5 passed) 
2 scenarios (2 passed) 
5 steps (5 passed) 
3 scenarios (3 passed) 
5 steps (5 passed) 
    When I open the uri "#/"     # test/integration/features/001-i-can-see-brands.feature:5 
UnknownError: Session ID is null. Using WebDriver after calling quit()? 
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50' 
System info: host: 'HP-Z230', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.19.0-25-generic', java.version: '1.7.0_79' 
Driver info: driver.version: EventFiringWebDriver 

А вот функция

Feature: 

    Background: 
    When I open the uri "#/" 

    Scenario: 
    Then I should be on the uri "#/brand" 
    And I should see several css "brand-card" 

А вот мой protractor.conf.coffee

exports.config = 
    baseUrl: 'http://localhost:3102' 
    seleniumServerJar: '../node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar' 
    framework: 'cucumber' 
    multiCapabilities: [ 
    # { 
    # browserName: 'phantomjs' 
    # 'phantomjs.binary.path': require('phantomjs').path 
    # 'phantomjs.ghostdriver.cli.args': ['--loglevel=DEBUG'] 
    # } 
    { browserName: 'chrome' } 
    ] 
    specs: [ 
    'integration/features/*.feature' 
    ] 
    cucumberOpts: 
    require: 'integration/steps/*.coffee' 
    format: 'pretty' 

У вас какие-либо идеи, почему они запуска несколько раз?

ответ

0

Я нашел ответ: версия cucumberjs 0.5.2 является ошибкой. Решается путем установки версии до 0,5.1

Смежные вопросы