How to use the allure-js-commons.AllureRuntime function in allure-js-commons

To help you get started, we’ve selected a few allure-js-commons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github allure-framework / allure-js / packages / allure-cucumberjs / features / step_definitions / Reporter.ts View on Github external
constructor(options: any) {
    super(
      options,
      new AllureRuntime({ resultsDir: "./out/allure-results" }),
      {
        labels: {
          issue: [/@bug_(.*)/],
          epic: [/@feature:(.*)/]
        },
        exceptionFormatter: function(message) {
          return message.replace(/after (\d+)ms/g, function(substr, ms) {
            return `after ${Math.round(Number.parseInt(ms) / 1000)}s`;
          });
        }
      }
    );

    const giw = this.getGlobalInfoWriter();
    giw.writeExecutorInfo({
      name: "Host 1",
github allure-framework / allure-js / packages / allure-mocha / src / MochaAllureReporter.ts View on Github external
constructor(readonly runner: Mocha.Runner, readonly opts: Mocha.MochaOptions) {
    super(runner, opts);

    const allureConfig: IAllureConfig = { resultsDir: "allure-results", ...opts.reporterOptions };

    this.coreReporter = new AllureReporter(new AllureRuntime(allureConfig));

    allure = this.coreReporter.getInterface();

    this.runner
      .on("suite", this.onSuite.bind(this))
      .on("suite end", this.onSuiteEnd.bind(this))
      .on("test", this.onTest.bind(this))
      .on("pass", this.onPassed.bind(this))
      .on("fail", this.onFailed.bind(this))
      .on("pending", this.onPending.bind(this));
  }
github allure-framework / allure-js / packages / allure-jasmine / src / JasmineAllureReporter.ts View on Github external
constructor(config: IAllureConfig) {
    this.runtime = new AllureRuntime(config);
    this.installHooks();
  }