Skip to content

Allure report could not occur #6

@nurullahsahin44

Description

@nurullahsahin44

Cypress project and using badeball/cucumber , when I add to allure-report configuration, project is running but allure report could not occur. Actually I want to ask you

This is my package.json
{
"name": "automation",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@badeball/cypress-cucumber-preprocessor": "^18.0.4",
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
"@cypress/browserify-preprocessor": "^3.0.2",
"@cypress/webpack-preprocessor": "^5.17.1",
"@shelex/cypress-allure-plugin": "^2.40.0",
"@types/cypress": "^1.1.3",
"cucumber": "^6.0.7",
"cypress": "^12.17.4",
"cypress-xpath": "^2.0.1",
"esbuild": "^0.17.19",
"eslint-plugin-cypress": "^2.13.3",
"typescript": "^5.1.6"
},
"cypress-cucumber-preprocessor": {
"step_definitions": "cypress/support/step_definitions/**/*.js.",
"html": {
"enabled": true,
"output": "cypress/reports/cucumber-html/cucumber-report.html"
},
"messages": {
"enabled": true,
"output": "cypress/reports/cucumber-ndjson/cucumber-report.ndjson"
}
},
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@cucumber/cucumber-expressions": "^16.1.2",
"@cucumber/gherkin": "^26.2.0",
"uuid": "^9.0.0"
}
}

This is my cypress.config.js

const { defineConfig } = require("cypress");
const { addCucumberPreprocessorPlugin } = require("@badeball/cypress-cucumber-preprocessor");
const createBundler = require("@bahmutov/cypress-esbuild-preprocessor");
const { createEsbuildPlugin } = require("@badeball/cypress-cucumber-preprocessor/esbuild");

module.exports = defineConfig({
chromeWebSecurity : false,
e2e: {
specPattern: "**/*.feature",
async setupNodeEvents(on, config) {
// implement node event listeners here
await addCucumberPreprocessorPlugin(on,config);
on("file:preprocessor", createBundler({
plugins: [createEsbuildPlugin(config)],
}));
allureWriter(on, config);
return config;
},
},
});

I checked https://www.npmjs.com/package/@shelex/cypress-allure-plugin
first step - npm i -D @shelex/cypress-allure-plugin
second step - cypress.config.js , and you can see above
third step - added e2e.js - import '@shelex/cypress-allure-plugin';
And I am using command for run - npx cypress run --env allure=true

Project is running but - allure-results not created

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions