Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cap-js-community/cds-cucumber

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cap-js-community/cds-cucumber

A library to write behaviour-driven tests for CAP applications

  • 0.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 24 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc