Coder Social home page Coder Social logo

joanesquivel / cypress-cucumber-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
102.0 8.0 101.0 2.54 MB

Cypress.IO Project using Javascript and Cucumber to start automating E2E tests just cloning it and installing dependencies.

JavaScript 73.46% Gherkin 26.54%
automation cucumber cucumberjs cypress cypress-io gherkin javascript testing typescript

cypress-cucumber-boilerplate's Introduction

cypress-cucumber-boilerplate-for-e2e-testing

exemplo imagem

Cypress 10+ with Cucumber boilerplate project.

๐Ÿ’ป Topics

Integrated with:

(+ bundlers: https://github.com/badeball/cypress-cucumber-preprocessor/tree/master/examples)

  • ๐Ÿ’ป Pre-requisites

  1. Node JS
  2. Optional: Java 8 for Allure Reporter
  3. Optional: Json-formatter for Native Reporter option(depends on your OS: https://github.com/cucumber/json-formatter)

๐Ÿš€ Install the project

Install project dependencies with: npm i

Run the demo:

  1. Standard Execution: npm run cypress:execution
  2. Native report(with JSON FORMATTER): Check how to do it in this video: Cucumber BDD Report - YouTube
  3. Allure Report:
    1. npm run cypress:execution-allure
    2. npm run allure:report
    3. allure open
    4. You'll get a report like this one: GitHub Page - Allure Report Sample: https://joanesquivel.github.io/cypress-cucumber-boilerplate/

Sample repo to generate an allure report as an artifact using GH Actions

cypress-cucumber-boilerplate's People

Contributors

joanesquivel avatar veke 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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cypress-cucumber-boilerplate's Issues

Run example with multiple tags

Hello @JoanEsquivel !

Thank you for providing this nice boilerplate! Is there any option to run by using the same command multiple tags? (let's say @mobile and @desktop)

I've had a look over the package.json but couldn't find any example, but only with one tag:
"cypress:execution-tags": "cypress run --env tags=@mobile",

Thanks

Getting spawn error

npm run cypress:execution
Getting error
Error: spawn Unknown system error -86 at ChildProcess.spawn (node:internal/child_process:413:11) at Object.spawn (node:child_process:743:9) at afterRunHandler (/Users/jlair3/cypress-cucumber-api/node_modules/@badeball/cypress-cucumber-preprocessor/lib/add-cucumber-preprocessor-plugin.js:88:55)
I am using node 18.
I didn't make any change yet but straight npm i and then npm run cypress:execution

Yaml / read data in our tests

Hi, JoanEsquivel , how to read yaml data in cypress cucumber framework, I need to read value of yml by node and key in my tests please help me to find solution it will be very much help full @JoanEsquivel โ˜บ

Error after mp4 created

I installed all prerequisites. Verified the standalone formatter was working properly. I get this error after the run:

(Video)

  • Started processing: Compressing to 32 CRF
  • Finished processing: /Users/chunter/source/Cypress10Cuke/cypress-cucumber-boiler (0 seconds)
    plate/cypress/videos/login.feature.mp4

An error was thrown in your plugins file while executing the handler for the after:run event.

The error we received was:

Error: spawn cucumber-json-formatter.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] cypress:execution: cypress run
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] cypress:execution script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/chunter/.npm/_logs/2022-09-10T00_04_57_720Z-debug.log

StepDefinitions configuration

Hi @JoanEsquivel , I'm trying to make configuration for my project Cypress and I'm facing some issues when trying to run the test I'm having the issue if different features have the same Given entry point massage.

How can I edit the stepDefinition inside my .cypress-cucumber-preprocessorrc.

This is my .cypress-cucumber-preprocessorrc file configuration.

{
  "json": {
    "enabled": true,
    "output": "json-logs/report.json",
    "formatter": "./jsonFormatter/cucumber-json-formatter.exe"
  },
  "messages": {
    "enabled": false,
    "output": "json-logs/messages.ndjson"
  },
  "html": {
    "enabled": false,
    "output": "cucumber-reporter.html"
  },
  "nonGlobalStepDefinitions": false,
  "stepDefinitions": ["cypress/e2e/step_definitions/**/*.{js,ts}"]
}

Screenshot 2024-06-12 155450

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.