-1

我正在使用 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.
4

1 回答 1

0

你是如何运行 Jenkins 的?如果您在无头服务器上运行它,则可能您从未启动过像 xvfb 这样的无头显示,如果有,则可能是您尚未导出显示。

于 2013-07-17T05:14:48.887 回答