CDS pluginCDS plugintypeInstalls into a CAP project and extends the runtime. CAP loads it through cds.requires or the plugin hook.See every one →What this type is →by a community orgby a community orgoriginPublished by a community organisation, so it outlives any one maintainer.See every one →

cds-cucumber

Behaviour-driven tests for CAP applications: Gherkin scenarios that drive a running service rather than assertions written against handlers.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Provides
TestingCAPTestingcapabilityProving the service still does what it did — against the model and the handlers, without a deployed system and without a database somebody has to keep clean.
Flavors

Who is behind it

cap-js-communitycap-js-communityOrganisationMaintains this
In the atlas: maintains 10
@cap-js-community
maintainerChristian GeorgiPersonContributes to this
In the atlas: maintains 1, contributes to 53
@chgeo
Christian NeuPersonContributes to this
In the atlas: contributes to 5
@christianneu
Vladislav LeonkevPersonContributes to this
In the atlas: contributes to 12, wrote 1
@vl-leon
3 contributors

Before choosing this

Conditions

LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
  • § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
SAP Developer License Agreement 3.2 CAP →

What it declares

Every artifact

Type
CDS plugin
Origin
By a community org

As a CDS plugin

Distributed through
npm

Connections1

cds-cucumber connectionscds-cucumberPROVIDES→ provides1provides authoredTesting

Install

npm add cds-cucumber

Derived from the package name. No recipe recorded; the README has the configuration.

Learn more1

Readings
  1. CAP full-stack testing with BDD flavourVladislav Leonkev, SAP Community
What changed
  1. v0.3.7

    The browser is chosen with CDS_CUCUMBER_BROWSER=chrome|firefox, and the variable CDS_CUCUMBER_FIREFOX is removed. When Application Studio is detected, the default browser is Firefox.

    Makes stale:

    Test setups that set CDS_CUCUMBER_FIREFOX to run the UI steps in Firefox.

2 earlier
  1. v0.3.5

    The step Given we have started the CAP application is removed; scenarios use Given we have started the application instead.

    Makes stale:

    Feature files that open with Given we have started the CAP application.

  2. v0.2.1

    The UI step we select additional row in value help dialog is removed, and we select one row in value help dialog no longer clears the previous selection.

    Makes stale:

    Scenarios that use the step we select additional row in value help dialog.

README

quoted from cap-js-community/cds-cucumber under Apache-2.0, read
cap-js-community/cds-cucumber/README.mdOn GitHub

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.

Apache-2.0, read

History

Latest

v0.4.3

Removed, Features, Changed, Fixes

Notes
Added
Changed
Removed
Fixed
  1. v0.4.2

    Fixes 1

    Notes
    Fixed
    • process management - set TEMP and TMPDIR environment variables for @cap-js-community/odata-v2-adapter
  2. v0.4.1

    Changed 1, Fixes 1

    Notes
    Changed
    • dependencies: make @sap/cds a peer dependency
    Fixed
    • process management - set TMP environment variable for @cap-js-community/odata-v2-adapter
  3. v0.4.0

    Features 2

    Notes
    Added
    • server-side code-coverage
    • OData:
      • support protocol version 2: Given we require communication protocol "odata-v2"
      • perform actions: When we execute action {word} with payload
  4. v0.3.9

    Features 1, Fixes 1

    Notes
    Added
    • cds-add-cucumber - create an example github actions workflow file
    Fixed
    • UI - skip InvisibleText elements
  5. v0.3.8

    Fixes 1

    Notes
    Fixed
    • UI: 1.121.0 onfocusin requires target
  6. v0.3.7dated in the atlas

    Removed 1, Features 1, Changed 1, Fixes 1

    Notes
    Added
    • Environment variable: CDS_CUCUMBER_BROWSER=chrome|firefox
    Changed
    • Browser: default browser set to 'firefox' when Application Studio is detected
    Removed
    • Environment variable: CDS_CUCUMBER_FIREFOX
    Fixed
    • Secure working directory removal
  7. v0.3.6

    Fixes 2

    Notes
    Fixed
    • Plugin: generated test using removed step
    • Documentation: README referencing removed step
  8. v0.3.5dated in the atlas

    Removed 1, Features 1, Fixes 1

    Notes
    Added
    • Documentation: environment variable CDS_COMMAND_ARGn
    Removed
    • Steps Given we have started the CAP application
      alternative: Given we have started the application
    Fixed
    • selenium-webdriver: add option --headless
  9. v0.3.4

    Features 1, Fixes 1

    Notes
    Added
    • Firefox support enabled via environment variable CDS_CUCUMBER_FIREFOX=1
    Fixed
    • OData: retrieve service path via annotation "@path"
  10. v0.3.3

    Features 2, Changed 2, Fixes 1

    Notes
    Added
    • UI: enable SAP UI5 1.120.1
    • cds-add-cucumber: create vscode extensions recommendation file when missing
    Changed
    • chromedriver: changed dependency to "latest"
    • UI: reuse TableUtils when selecting rows in ValueHelp dialogs
    Fixed
    • Security issue in axios - dependency tree update
  11. v0.3.2

    Fixes 2

    Notes
    Fixed
    • OData: expectation step "its {word} to be {word}"
    • UI: "modify field" step
  12. v0.3.1

    Fixes 1

    Notes
    Fixed
    • service
      • terminate service process
      • home directory for Windows OS
  13. v0.3.0

    Changed 2

    Notes
    Changed
    • UI
      • step "modify field" extended with ValueHelp dialog support
    • node
      • require engine >= 18
  14. v0.2.1dated in the atlas

    Removed 1, Features 3, Changed 2, Fixes 2

    Notes
    Added
    • Windows OS support
    • UI
      • enable CORS
      • specify Accept-Language
    • OData
      • expectation for count(*) result
    Changed
    • Simplified "Getting started" guide
    • UI
      • step "we select one row in value help dialog" does not clear the previous selection
    Removed
    • UI
      • step "we select additional row in value help dialog"
    Fixed
    • UI
      • step "we select one row in value help dialog" works with all target UI5 versions
    • temporary directory creation when running in parallel
  15. v0.2.0

    Features 1, Changed 1, Fixes 5

    Notes
    Added
    • OData steps
    Changed
    • Readme: switch to bookshop sample "cds add sample"
    Fixed
    • Readme: install from npm repository
    • Plugins:
      • reject failing commands
      • hide test plugins
    • Concurrency:
      • allow cucumber parallel jobs: npx cucumber-js test --parallel 2
      • create new working directory (username and process ID dependent) using it as follows:
        • Chrome: user data directory
        • CAP services: home directory
    • Steps:
      • detect technical issues when selecting tiles
      • detect missing ValueHelp popup
      • add new step: remove ValueHelp selection
      • locating active dialog
    • cucumber:
      • remove deprecated configuration: publishQuiet
  16. v0.1.0

    Features 1

    Notes
    Added
    • Initial version
Testing
  1. com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
  2. @cap-js/cds-testTest support for CAP Node.js: server start, HTTP client, assertions
  3. sapbrunoTerminal UI running Bruno collections against a CAP service
  4. cds-launchpad-pluginSandbox launchpad for all SAPUI5 apps in a CAP workspace
  5. enforce-export-coverageStatic check that each exported TypeScript function has a test
  6. @sap-ux/fe-mockserver-plugin-cdsFiori Elements mock server plugin taking a CDS file as metadata

Details

Sources5
npm registrydiscovered herechecked
The discovery passdiscovered herechecked
npm registry, cds-cucumberversion, releases, installschecked
github.com/cap-js-community/cds-cucumbertree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered vianpm registry, The discovery pass
first seen in the atlas
ecosystem and domaincap, developer-experience
Flavors1
Node.js
“npm add -D @cap-js-community/cds-cucumber” — cap-js-community/cds-cucumber — READMEchecked
Contributors3

From the repository’s contributor list, .

History in the atlas2
  1. Behaviour-driven tests for CAP applications: Gherkin scenarios that drive a running service rather than assertions written against handlers.
  2. First seen.
For your agent
Ref
artifact:cap-js-community-cds-cucumber
JSON
/artifacts/cap-js-community-cds-cucumber.json
MCP
Connecting an agent