question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allure not creating reports

See original GitHub issue

I am using this plugin with @badeball/cypress-cucumber-preprocessor and it generate the videos and screenshots but not the allure-results

Here is my config.js

const { defineConfig } = require("cypress");
const webpack = require("@cypress/webpack-preprocessor");
const preprocessor = require("");
const allureWriter = require('@shelex/cypress-allure-plugin/writer');

async function setupNodeEvents(on, config) {
  await preprocessor.addCucumberPreprocessorPlugin(on, config);
  on(
    "file:preprocessor",
    webpack({
      webpackOptions: {
        resolve: {
          extensions: [".ts", ".js"],
        },
        module: {
          rules: [
            {
              test: /\.feature$/,
              use: [
                {
                  loader: "@badeball/cypress-cucumber-preprocessor/webpack",
                  options: config,
                },
              ],
            },
          ],
        },
      },
    })
  );
  allureWriter(on, config);
  return config;
}

module.exports = defineConfig({
  e2e: {
    specPattern: "**/*.feature",
    chromeWebSecurity: false,
    supportFile: false,
    numTestsKeptInMemory: 3,
    setupNodeEvents,
  },
});


And my package


{
  "name": "caixa_cypress",
  "version": "1.0.0",
  "description": "Caixa cypress",
  "main": "cypress.config.js",
  "scripts": {
    "test": "cypress open"
  },
  "author": "Roberto Teresa",
  "license": "ISC",
  "devDependencies": {
    "@badeball/cypress-cucumber-preprocessor": "^11.4.0",
    "@bahmutov/cypress-esbuild-preprocessor": "^2.1.3",
    "@cypress/browserify-preprocessor": "^3.0.2",
    "@cypress/webpack-preprocessor": "^5.12.0",
    "@shelex/cypress-allure-plugin": "^2.28.0",
    "allure-commandline": "^2.18.1",
    "cypress": "^10.3.0",
    "cypress-iframe": "^1.0.1",
    "cypress-xpath": "^2.0.0",
    "esbuild": "^0.14.48",
    "mocha-allure-reporter": "^1.4.0"
  },
  "dependencies": {
    "cypress-real-events": "^1.7.1"
  }
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
GRmeBcommented, Aug 3, 2022

I have the same issue. The allure JSONs are not generated anymore for me since the new version 2.28.1. By the way I’m using Cypress v10.4.0, but also with other Cypress 10 versions it is not working.

Maybe it is really related to the bugfix change in https://github.com/Shelex/cypress-allure-plugin/commit/c1ce8d6039c7840425b9f1894cf8388d7ebad697.

I’m calling the tests as the same as before:

./node_modules/.bin/cypress run --env allure=true --browser chrome --config-file config/cypress_stage.ts --spec cypress/e2e/mocha/functional/mytest.spec.js

And I’ve already imported the plugin in support/index.ts.

My config looks like this:

const allureWriter = require('@shelex/cypress-allure-plugin/writer');

export async function setupNodeEvents(
    on: Cypress.PluginEvents,
    config: Cypress.PluginConfigOptions
): Promise<Cypress.PluginConfigOptions> {
    const options = {
        ...browserify.defaultOptions,
        typescript: path.join(path.resolve('..'), 'node_modules/typescript'),
    };

    on('file:preprocessor', await preprocessor(config, options));

    await addCucumberPreprocessorPlugin(on, config);

    require('cypress-grep/src/plugin')(config);
    require('cypress-log-to-output').install(on);
    require('@cypress/code-coverage/task')(on, config);
    config = dotenvPlugin(config);

    allureWriter(on, config);

    return config;
}

module.exports = defineConfig({
// some more code  
    e2e: {
        specPattern: 'cypress/e2e/**/*.feature',
        experimentalSessionAndOrigin: false,
        setupNodeEvents,
    },
});
1reaction
javierfuentesmcommented, Aug 5, 2022

I just did and it works fine the new version 2.28.3 without the fallback property

thanks again! great library BTW

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allure report not generated using allure results #1614 - GitHub
I am new to Selenium learning to generate reports from Allure please help me I have downloaded the latest Allure file for windows, ......
Read more >
Unable to generate allure reports - Stack Overflow
You can change allure-results generation path by creating src/test/resources/allure.properties file with following content:
Read more >
Allure reports do not generate results when calling mvn test ...
I have no allure-results folder generated, I am very confused. Why would some arguments not be resulting in successful build of allure-reports?
Read more >
Allure Framework
Allure Framework is a flexible lightweight multi-language test report tool that not only shows a very concise representation of what have ...
Read more >
Allure Results Directory Path Setup - YouTube
Cucumber Before All and After All Hooks · Part1-How To Generate Allure Reports in Selenium & TestNG · Top 5 Excel Functions for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found