茉莉花记者不生成任何结果文件

Jasmine-reporters not generating any result file

我的系统中有以下版本

jasmine - reporters@1.0.0
node - v4.5.0
protractor - 4.0.10

而且我无法生成任何结果文件。对于我的脚本,这些版本是否存在一些兼容性问题, 我也试过 jasmine-reporters - 2.0.0 仍然没有运气。

请帮帮我谢谢

我的conf.js长得像

capabilities: {
        'browserName': 'firefox
    },

    onPrepare: function() {

       //The require statement must be down here, since jasmine-reporters
       //needs jasmine to be in the global and protractor does not guarantee
       // this until inside the onPrepare function.
        browser.driver.manage().window().maximize();
        require('jasmine-reporters');
        jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('testresults', true, true));
    },

    specs: [
            'Apps/ImportApp/importEMC.js',
    ],

我也尝试过 jasmine-reporters 2.0.0,代码是

framework: 'jasmine2',
onPrepare: function() {
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
    consolidateAll: true,
    savePath: 'testresults',
    filePrefix: 'xmloutput'
}));
},

为此它给了我错误

jasmineReporters.JUnitXmlReporter is not a function

错误日志

at exports.config.onPrepare (D:\HalomemTestScripts\halosysNewScripts\localWorkspace\halosysus_halomem-newtests\conf_importapp.js:33:38) at C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\built\util.js:48:49 at Function.promise (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:682:9) at Object.runFilenameOrFn_ (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\built\util.js:38:16) at C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\built\runner.js:93:27 at _fulfilled (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54) at Promise.then.Q.nextTick.self.promiseDispatch.done (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30) at Promise.promise.promiseDispatch (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13) at C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49 at runSingle (C:\Users\tanushree.y\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:137:13) [11:42:23] E/launcher - Process exited with error code 100

jasmine-reporters 不仅应该在我们的系统中更新,而且在我们有 node-modules 文件夹的项目存储库中也应该更新。我们还需要更新 jasmine-reporters 版本。 这是我在更新系统中的 jasmine 时犯的错误,但是当我在项目存储库的节点模块中更新 jasmine-reporters 时,它对我有用。 错过是一件非常愚蠢的事情。