【问题标题】:Tests processed several times with protractor and cucumber用量角器和黄瓜处理了几次测试
【发布时间】:2015-07-30 06:39:23
【问题描述】:

我实际上是在尝试配置量角器和黄瓜来运行测试,实际上它们似乎被启动了好几次。这是我的命令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'

你知道他们为什么要推出几次吗?

【问题讨论】:

    标签: cucumber protractor cucumberjs


    【解决方案1】:

    我找到了答案:cucumberjs 版本 0.5.2 有问题。通过将版本修复为 0.5.1 解决了这个问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多