Skip to content

End-to-End Automation Test Framework with BDD

License

Notifications You must be signed in to change notification settings

bltb/cypress-cucumber

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cypress-cucumber

End-to-End Automation Test Framework with BDD

Installation

Clone the directory and run

npm install
npm run test

Step definitions

put your step definitions in cypress/support/step_definitions

Examples: cypress/support/step_definitions/facebook.js

/* global Given, When, Then */
const url = 'https://www.facebok.com';

Given('I open Facebook page', () => {
    cy.visit(url);
});

Then('I see {string} in the title', (title) => {
    cy.title().should('include', title)
});

Since, Given/When/Then are on global scope. Please use

/* global Given, When, Then */

For more information please visit: https://docs.cypress.io/api/commands/as.html

Spec/Feature files

Your feature files in cypress/integration:

Example: cypress/integration/facebook.feature

Feature: The Facebook Page
I want to open a social network Page

Scenario: Opening a social network page
    Given I open Facebook page
    Then I see "Facebook" in the title

Cucumber Expressions

We use https://docs.cucumber.io/cucumber/cucumber-expressions/ to parse your .feature file, please use that document as your reference

Credits

This is based on the framework https://cypress.io and https://cucumber.io. The preprocessor to integrate both the frameworks are from https://github.com/TheBrainFamily/cypress-cucumber-preprocessor. Many thanks to the TheBrainFamily for the wonderful job.

About

End-to-End Automation Test Framework with BDD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 99.4%
  • Gherkin 0.6%