Serentiy Report with protracor and cucumber

寵の児 提交于 2019-12-12 04:34:09

问题


I have protractor cucumber example works fine, now I'm trying to create report by serenity.js

protractor.conf.js file

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'],
      }       
    };

The feature file

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

ANd package.json file is

{
"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"
}

But I get

I get E/launcher - Error: Error: EACCES: permission denied, scandir '/etc/cups/ssl' at Error (native) at Object.fs.readdirSync (fs.js:952:18) at GlobSync._readdir (/home/ali/node_modules/cucumber/node_modules/glob/sync.js:2‌​88:41) [18:15:41] E/launcher - Process exited with error code 100,Do you have any instructions?

Can any one help me please to fix this problem?

来源:https://stackoverflow.com/questions/43697992/serentiy-report-with-protracor-and-cucumber

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!