您好我已经编写了一个nodejs应用程序,其中包含一些用jasmine编写的测试。我正在尝试使用CLI在TFS中发布测试结果。
我已安装以下软件包
" jasmine-spec-reporter":" ^ 4.1.1", " jasmine-tfs-reporter":" ^ 1.0.0", " phantomjs-prebuilt":" ^ 2.1.14", " ts-node":" ^ 3.2.0"
以下是protractor.conf
/*global jasmine */
var SpecReporter = require('jasmine-spec-reporter');
var TfsReporter = require('jasmine-tfs-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/tests/*spec.js'
],
capabilities: {
'browserName': 'phantomjs',
'phantomjs.binary.path': require('phantomjs-prebuilt').path,
'phantomjs.ghostdriver.cli.args': ['--loglevel=DEBUG']
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
useAllAngular2AppRoots: false,
beforeLaunch: function() {
require('ts-node').register({
project: 'PartyAndIndustryDataMigration'
});
},
onPrepare: function() {
jasmine.getEnv().addReporter(new SpecReporter());
jasmine.getEnv().addReporter(new TfsReporter());
}
};
当我尝试从命令提示符执行量角器时,我收到错误 PartyAndIndustryDataMigration
指定的路径不存在答案 0 :(得分:1)
这是一个小修复。它必须纠正路径
useAllAngular2AppRoots: false,
beforeLaunch: function() {
require('ts-node').register({
project: '../PartyAndIndustryDataMigration'
});
},