我正在使用 Grunt-karma 来启动我的角度单元测试。当我在命令提示符下执行任务时,它工作正常,但是当我配置相同的 jenkins 时无法打开 firefox 窗口。谁能告诉我是什么问题。下面是我的配置文件
--业力配置
basePath = '../';
files = [
MOCHA,
MOCHA_ADAPTER,
'test/lib/angular/chai.js',
'Scripts/angular.js',
'Scripts/angular-*.js',
'test/lib/angular/angular-mocks.js',
'Scripts/ControllerForTest.js',
'Scripts/ControllerForTestModule.js',
'Scripts/LogLoader.js',
'Scripts/App.js',
'test/unit/**/*.js'
];
autoWatch = false;
singleRun = true;
browsers = ['Firefox'];
junitReporter = {
outputFile: 'test_out/unit.xml',
suite: 'unit'
};
咕噜任务——
karma: {
unit: {
configFile: 'config/karma.conf.js'
}
},
詹金斯日志——
E:\MedicineShopInvetory\MedicineShopInventory\MedicineShopInventory>grunt
[4mRunning "clean:src" (clean) task[24m
Cleaning "release"...[32mOK[39m
[4mRunning "uglify:dist" (uglify) task[24m
File "release/app.min.js" created.
[4mRunning "cssmin:minify" (cssmin) task[24m
File release/Doc.min.css created.
[4mRunning "karma:unit" (karma) task[24m
[32mINFO [karma]: [39mKarma server started at http://localhost:9876/
[32mINFO [launcher]: [39mStarting browser Firefox
[33mWARN [launcher]: [39mFirefox have not captured in 60000 ms, killing.
[32mINFO [launcher]: [39mTrying to start Firefox again.