量角器somewhy在semaphor中运行调试器

时间:2015-01-30 11:29:26

标签: node.js semaphore protractor

当我在本地运行量角器测试时,一切正常。但是当我在信号量上运行相同的测试时,上次启动调试器并得到如下响应:

Hit SIGUSR1 - starting debugger agent.
debugger listening on port 5858
[1G[0Jdebug> [8G[1G[0Kconnecting... ok
[1G[0Jdebug> [8G[1G[0Kbreak in timers.js:79
[1G[0K  77 }
[1G[0K  78 
[1G[0K  79 function listOnTimeout() {
[1G[0K  80   var msecs = this.msecs;
[1G[0K  81   var list = this;
[1G[0Jdebug> [8G

我不知道这是从哪里来的。因为我的代码中没有任何调试器。在信号量中,配置很简单,只需使用protractor -g installnpm install运行bower install。 如果需要这里的测试代码: 配置:

require('coffee-script').register();

exports.config = {
  seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.39.0.jar',
  seleniumAddress: 'http://localhost:4444/wd/hub',
  chromeOnly: true,
  chromeDriver: '../../node_modules/chromedriver/lib/chromedriver/chromedriver',
  capabilities: {
    browserName: 'chrome',
    'chromeOptions': {
      'args': ['--disable-extensions']
    }
  },

  rootElement: 'body',

  specs: [
    '*_spec.coffee'
  ],

  baseUrl: 'http://localhost:9000/',

  jasmineNodeOpts: {
    isVerbose: false,
    showColors: true,
    includeStackTrace: true,
    defaultTimeoutInterval: 30000
  }
};

查找css元素:

module.exports = ->
  @email = element By.css '.test-i-login'
  @password = element By.css '.test-i-password'
  @logIn = element By.css '.test-b-sign_in'
  @header = element By.css '.test-title'

  @setEmail = (name) =>
    @email.sendKeys(name)
    this

  @setPass = (number) =>
    @password.sendKeys(number)
    this

  @clickLogIn = =>
    @logIn.click()

  this

并测试:

loginPage = require './pages/log_in_page'

describe 'Log In', ->

  it 'shows after login', ->
    browser.get('    loginPage = require './pages/log_in_page'

describe 'Log In', ->

  it 'shows after login', ->
    browser.get('http://localhost:9000/')

    loginPage()
    .setEmail('test@dispatch.me')
    .setPass('a46s75d4as765d4a6s7d54as76d5as74das76d5')
    .clickLogIn()

    expect(loginPage().header.getText()).toEqual('Accounts')http://localhost:9000/')

    loginPage()
    .setEmail('test@dispatch.me')
    .setPass('a46s75d4as765d4a6s7d54as76d5as74das76d5')
    .clickLogIn()

    expect(loginPage().header.getText()).toEqual('Accounts')

0 个答案:

没有答案