2015-03-03 138 views
1

我使用Grunt在我的項目中使用了角度和節點。對於測試中,我用黃瓜+量角器+ grunt-stubby這裏是Gruntfile.js咕嚕短粗和量角器任務

grunt.registerTask('test', [ 
    'selenium_start', 
    'clean:server',  
    'ngconstant:testing', 
    'concurrent:test', 
    'autoprefixer', 
    'connect:test', 
    'karma', 
    'stubby', 
    'protractor', 
    'selenium_stop', 
    ]); 

我的問題是,當量角器任務運行,stubbys的任務就是在我的註冊任務。

回答

1

我的猜測 - 你需要使用咕嚕,量角器,亞軍和呼嚕聲,量角器,webdriver的,告訴咕嚕和量角器在哪個端口粗短被監聽,例如:

grunt.initConfig({ 
    .. 
    // Grunt server settings 
    connect: { 
     stubby: { 
      options: { 
       .. 
       port: 8001 
       .. 
      } 
     } 
    }, 
    .. 
    protractor: { 
     .. 
     stubby: { 
      options: { 
       .. 
       args: { 
        baseUrl: 'http://localhost:8001' 
       } 
       .. 
      } 
     } 
     .. 
    } 
    .. 

}); 
.. 
grunt.registerTask('test', [  
    .., 
    'karma', 
    'connect:stubby', 
    'stubby', 
    'protractor:stubby' 
]); 
.. 
+0

謝謝你,這就是它。 – 2015-05-10 10:16:00