cucumber / cucumber/godog

Replace the generic Step function with Given/When/Then functions to match the majority of other languages

Open
#545 14 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.7k
Forks
280
Avg merge
2d 20h
Merged PRs (30d)
2

Description

### 🤔 What's the problem you're trying to solve?

I'm trying to add support for Go (godog) to Cucumber language service, so that we can finally use Go BDD support in VSCode.

It's a bit tricky because of the generic `Step` func and not having the separate `Given/When/Then` funcs instead.

Raised a poll here: https://github.com/cucumber/godog/discussions/542

### ✨ What's your proposed solution?

- Mark the `Step` function as deprecated
- Add 3 new functions to match their respective counterparts in the feature files - `Given/When/Then`

### ⛏ Have you considered any alternatives or workarounds?

No alternatives considered. I think we should "just" do this to keep the syntax consistent with other programming languages.

### 📚 Any additional context?

----

*This text was originally generated from a [template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates), then edited by hand. [You can modify the template here.](https://github.com/cucumber/.github/edit/main/.github/ISSUE_TEMPLATE/feature_request.md)*

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; start by locating the existing generic Step function and its callers, then review the linked godog discussion for the API expectations. Done means Step is deprecated and separate Given, When, and Then functions are available with syntax matching the feature-file counterparts.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.