Git Product home page Git Product logo

shelex / cypress-allure-plugin-example Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 29.0 59.23 MB

example of cypress + cypress-allure-plugin + github action as CI + allure hosted as github page, report:

Home Page: https://shelex.github.io/cypress-allure-plugin-example/

JavaScript 94.41% Gherkin 5.59%
allure allure2 cypress cypress-example cypress-io cypress-plugin github-action github-pages

cypress-allure-plugin-example's People

Contributors

actions-user avatar shelex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cypress-allure-plugin-example's Issues

How to get the allure test case count, pass count, fail count

I am using GitLab, kind of figuring out a way to upload the allure-* folders into AWS s3 and making sure the index.html is a static website and open for us through the cloud front.

But now I want to know the count of no test cases executed, passed, and failed so that this will be very useful. Please help with this.

looking for a simple sample code which is explained below

Actually, I'm interested and was looking into https://github.com/Shelex/cypress-allure-plugin sample code. First of all, I'm very new to Cypress/Cucumber/Typescript. We use the above combination and https://www.npmjs.com/package/cypress-cucumber-preprocessor. Here is what I want to accomplish and understand if your plugin will work for me with minimum rewriting or adding a lot of code.
Let's say I have a feature with a step for login into some site. Under that, I'll have a step:
cy.screenshot('login_blah').
Then another step:
somehow make a mention of a file to attach to a report (or just a text string)

When run I want on-demand screenshot I want to see attached to a step and in case of fail attach a screenshot shot also. Then a text file for example attached too
Is that possible to do it with your plugin? If it is it'll great if you can make a short example. Please, let me know

Thanks a lot in advance

Jeff

Allure report could not occur

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.