Repository: cucumber/common

Issue #521: Proposal: Step definition inventory in message protocol
Created: 2018-11-01T09:06:26Z
Large projects have lots of step definitions. Knowing what step definitions are available can become a bit of. challenge for users. Tools like IDEA help, but it relies on sources to be available. Some teams package up reusable step definitions in modules, and these aren’t easily available.
If the message protocol supported a way to represent all available step definition expressions, this metadata could be embedded in modules (for example in cucumber-metadata.protobuf or cucumber-metadata.json). Other authoring and documentation tools could also take advantage of this metadata to provide a list of step definitions, autocomplete and validation.
See this discussion for more context.

Duplicate issue #946: Introduce "Step Declaration" File
Created: 2020-03-28T19:56:56Z
Summary
Right now, you can define Feature Scenarios in the .feature file. However, by looking at only the Feature file, you are not able to tell what are the exhaustive list of available Steps to be used in every Scenario. To know the list of Steps, one must check the Step Definition source code, which could be located in a place where the tester is unfamiliar, or might not even be in the same repository (for multi-repo architectures, where multiple repositories depend on one Behavior definition repository). Not only this makes it hard for the person who writes the Feature definitions to know all the steps made available to them, it also removes any possibility in developing a compile-time or syntax-highlighter check if the Feature files are correct.
Expected Behavior
For us to be able to: review/access a list of steps available for Feature definitions, build syntax highlighters, and check the correctness of Feature files at compile-time rather than runtime.
Current Behavior
Right now, none of this is possible.
Possible Solution
Introduce "Step Declaration" File
Ideally, we can "declare" Steps in a file, just like how we define Features. Imagine a *.step file, containing just the list of step regular expressions, and no implementation. A Feature file could then import multiple *.step files at the header, which opens up so many possibilities in terms of scoping, syntax highlighting, and compile-time checking.
Context & Motivation
When you're working across multiple repositories, where many repos implement the Feature definitions in their tests, it's very useful to have a list of Steps that is agreed as "services" that a system provides. The writer and maintainer of the Feature files do not need to know where and how the Steps are defined - which could be at multiple repositories.
Think of it as an "interface to Step definitions". Just the list of steps the system(s) support, the syntax and parameters it expects, and nothing else. This could take Cucumber to the next level as a BDD framework for large codebases sitting across multiple repositories.
Your Environment

Link to your project: https://github.com/graknlabs
We haven't made our BDD feature definition repository public

Closing comment (2020-03-30T23:27:54Z): I'm closing this as it seems to be a duplicate of #521