我有量角器黄瓜示例工作正常,现在我正在尝试通过 serenity.js 创建报告
protractor.conf.js 文件
exports.config = {
getPageTimeout: 600000,
allScriptsTimeout: 700000,
framework: 'custom',
frameworkPath: require.resolve('serenity-js'),
capabilities: {
'browserName': 'chrome'
},
specs: [
'/home/git/adap_gateway/src/test/features/*.feature'
],
baseURL: 'http://localhost:8099/',
cucumberOpts: {
require: '/home/git/adap_gateway/src/test/javascript/stepDefinitions.js',
format: ['pretty'],
}
};
特征文件
Feature: Running Cucumber with Protractor
Scenario: Protractor and Cucumber Test
Given I go to "http://localhost:8099/#/"
When I add login credential
Then I go to scenario home page
Then I go to scenario details page
Then I go to edit attack tree page
Then build attack tree
并且 package.json 文件是
{
"name": "c",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"gulp": "^3.9.1",
"protractor-cucumber": "^0.1.8",
"protractor-cucumber-framework": "^3.1.0"
},
"devDependencies": {
"protractor-cucumber": "^0.1.8",
"serenity-cli": "^0.2.4",
"serenity-js": "^1.4.1",
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prereport": "serenity update",
"report": "serenity run"
},
"author": "",
"license": "ISC"
}
但我明白了
我在 GlobSync._readdir (/ home/ali/node_modules/cucumber/node_modules/glob/sync.js:288:41) [18:15:41] E/launcher - 进程退出,错误代码为 100,你有什么指示吗?
任何人都可以帮我解决这个问题吗?