Using Datatable in Cypress Cucumber

In the previous post here, we saw how to use cucumber along with Cypress. The demo scenario we saw was a basic example. Now let us look into how we can use datartable in cypress cucumber. ##Feature File## Feature: Demo for BDD in Cypress I want to demo using BDD in Cypress @focus Scenario: Logging into ECommerce Site Given I open Demo shopping page When I login as 'standard_user' user Then I should see products listed Given I add below products to cart |ProductName |Qty| |Sauce Labs Backpack |1 | |Sauce Labs Fleece Jacket |1 | |Sauce Labs Onesie |1 | The step definition file will be as below ...

December 11, 2020

Writing Cypress tests in BDD format

As discussed in previous posts here and here, we use Cypress for writing tests to validate GUI and API tests. In many companies we use behaviour driven development practises where the requirements or acceptance criteria are specified in Gherkin format. As a results, test automation scenarios are also written in Gherkin format. Cucumber , Specflow etc are some of such framework used extensively . In this post, let us examine how we can write BDD test cases in Cypress. ...

December 9, 2020