Coder Social home page Coder Social logo

vl-leon / cds-cucumber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cap-js-community/cds-cucumber

0.0 0.0 0.0 892 KB

Behaviour-driven tests of CAP applications

Home Page: https://cap-js-community.github.io/cds-cucumber/

License: Apache License 2.0

Shell 12.73% JavaScript 65.37% Gherkin 19.86% CAP CDS 1.81% Batchfile 0.23%

cds-cucumber's Introduction

CDS for Cucumber

Provides a library for behaviour-driven tests of CAP applications. It contains ready-to-use steps that help you write tests in a BDD style. The cucumber project provides framework for that.

As of now, the library supports SAP Fiori® Elements as UI framework and OData as communication protocol.

A typical test looks like this:

Feature: Fiori preview page

  Scenario: Open first Fiori preview page
    Given we have started the application
      And we have opened the url "/"
    When we click on first Fiori preview page
      And we search for "jane"
    Then we expect to have 1 table records

The project is in early beta phase, please expect changes.

Documentation

List of steps and details is available in the documentation.

Usage

Setup

Install the CAP development toolkit:

npm add -g @sap/cds-dk

Create a project

Make sure you have a CAP project. You can create one with the following command:

cds init --add sample bookshop
cd bookshop

Configure

npm add -D @cap-js-community/cds-cucumber
npx cds-add-cucumber

Add feature files

File: test/features/first.feature

Feature: Bookshop first feature file

  Scenario: Open "Manage Books" as "alice" and search for "jane"
    Given we have started the application
      And we have opened the url "/" with user "alice"
    When we select tile "Manage Books"
      And we search for "jane"
    Then we expect to have 2 table records

For existing projects you have to adjust the example above.

Run feature tests

npx cucumber-js test

A recent version of the chrome browser should be present on the system.

More

For additional information see the details page.

Support, Feedback, Contributing

This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

Copyright 2023 SAP SE or an SAP affiliate company and cds-cucumber contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

cds-cucumber's People

Contributors

vl-leon avatar chgeo avatar christianneu avatar

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.