См. Репортеров Cucumber Html в Jenkins при выполнении теста Protractor - PullRequest
0 голосов
/ 05 августа 2020

Мне бы хотелось увидеть репортера Cucumber Html в Jenkins, прежде чем я выполню свой тест транспортира, но я не знаю, как получить к ним доступ:

Это мой cucumberconfig.ts:

import { Config } from 'protractor';
import * as reporter from "cucumber-html-reporter";
import { truncate } from 'fs/promises';
export let config: Config = {
    directConnect: true,
    capabilities: {
        browserName: 'chrome',
       chromeOptions: {
         args: ['--disable-dev-shm-usage', '--no-sandbox', '--headless', '--disable-web-security','--allow-insecure-localhost', '--ignore-urlfetcher-cert-requests' ]
        shardTestFiles: true,
        maxInstances: 10
    },
    framework: 'custom',
    frameworkPath: require.resolve('protractor-cucumber-framework'),
    "types": ["chai", "cucumber", "node"],
    specs: ['../../../e2e/src/features/programs.feature'],
    cucumberOpts: {
      format:'json:./e2e/report/output/cucumber_report.json',
      require: ['src/stepDefinitions/*.js']
    },
    onComplete: () =>{
      var reporter = require('cucumber-html-reporter');
      var options = {
        theme: 'bootstrap',
        jsonFile: './e2e/report',
        output: './e2e/report',
        reportSuiteAsScenarios: true,
        launchReport: true,
       
      };
      reporter.generate(options);
    },
  plugins: [{
    package: 'protractor-multiple-cucumber-html-reporter-plugin',
    options:{
        automaticallyGenerateReport: true,
        removeExistingJsonReportFile: true,
    }
  }]
}

А в jenkins я вижу следующее, когда тесты будут завершены:

=====================================================================================
    Multiple Cucumber HTML report generated in:

    /usr/src/app/e2e/report/output/report/index.html
=====================================================================================

, но я не могу получить к ним доступ. Может кто-нибудь помочь мне ? Заранее спасибо.

1 Ответ

0 голосов
/ 05 августа 2020

Я мог видеть, что они находятся в рабочем пространстве Дженкинса. Спасибо!

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...