question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to configure multiple directories for step definitions

See original GitHub issue

I want to configure multiple directories for storing step definitions.

We have packaged common test steps into a npm library, and each application can have its own step definitions in addition to the common step definitions. I haven’t found any documentation showing how to do that.

This is the actual fragment of package.json, it contains only the step definitions of the application. How to add the common step definitions contained in the folder node_modules/@netan/common-step-definitions ?

  "cypress-cucumber-preprocessor": {
    "nonGlobalStepDefinitions": false,
    "stepDefinitions": "test/javascript/features/step_definitions"
  }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andsampcommented, Jun 9, 2021

@andsamp @courtney-regis Is there any documentation on how you did the export/import of the step definitions? Thanks in advance!

It is fairly straight forward, we created a @team/cypress artifact that install as a dev dep. the import goes in a shared.js file where we have our project-specific step-definitions (${integrationFolder}/step-definitions).

import '@team/cypress/step-definitions';

Within the @team/cypress project we have a src/step-definitions directory with the step-definitions broken out as we see fit and then we have an an index.js in that directory where we import all of the other files.

0reactions
badeballcommented, Apr 10, 2022

Due to personal reasons, the previous maintainers of this package are stepping down and handing the reigns over to me, a long-time contributor to the project and a user of it myself. This is a responsibility I’m very excited about. Furthermore, I’d like to thank @lgandecki ++ for all the work that they’ve done so far.

Read more about the transfer of ownership here.

The repository has however moved and all outstanding issues are being closed. This is not a reflection of the perceived importance of your reported issue. However, if after upgrading to the new version, you still find there to be an issue, feel free to open up another ticket or comment below. Please make sure to read CONTRIBUTING.md before doing so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to configure multiple directories for step definitions #353
I want to configure multiple directories for storing step definitions. We have packaged common test steps into a npm library, and each application...
Read more >
Step definition from multiple files for same scenario
You can place your step definitions in logically distinct files within various folders, as you see fit (example below). After all, it is...
Read more >
Step Organization - Cucumber Documentation
As your project grows, you should split your step definitions into meaningful groups in different files.
Read more >
Unused Step Definitions - SpecFlow's documentation
The Step Definition Attribute with Regex we sum the two numbers will be ... Step Definitions from multiple binding assemblies using feature-folder command:....
Read more >
Selenium Cucumber Java BDD Framework 1 - Setup - YouTube
Free Tutorials - https://automationstepbystep.com/Quiz - https://forms.gle/XZeHkARaRi4K18Wm6Step 1, create a maven project: 0:00-3:12 Step 2 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found