Skip to content

test: change test framework from cucumber-cpp to cwt-cucumber#89

Merged
NeaguGeorgiana23 merged 12 commits intomainfrom
cwt-cucumber
Apr 8, 2026
Merged

test: change test framework from cucumber-cpp to cwt-cucumber#89
NeaguGeorgiana23 merged 12 commits intomainfrom
cwt-cucumber

Conversation

@NeaguGeorgiana23
Copy link
Copy Markdown
Contributor

@NeaguGeorgiana23 NeaguGeorgiana23 commented Mar 13, 2026

This PR

  • Changes the test framework from cucumber-cpp to cwt-cucumber

Notes

We do this because cwt-cucumber is a lightweight, modern C++20 BDD testing framework for native C++ projects. We wanted to switch from cucumber-cpp because this framework was using a wire protocol and have Cucumber-Ruby connecting to a TCP port where the C++ implementation is listening.

Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
@NeaguGeorgiana23 NeaguGeorgiana23 requested review from a team as code owners March 13, 2026 11:42
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the project's testing infrastructure by migrating from the cucumber-cpp framework to cwt-cucumber. This change aims to leverage cwt-cucumber's benefits as a lightweight, modern C++20 BDD testing framework, eliminating the need for the cucumber-cpp wire protocol and its Ruby dependencies, thereby simplifying the test setup and execution.

Highlights

  • Test Framework Migration: Switched the C++ BDD testing framework from cucumber-cpp to cwt-cucumber.
  • Dependency Cleanup: Removed cucumber-cpp's wire protocol dependency and associated Ruby tooling and Bazel rules.
  • Modern C++20 Integration: Integrated cwt-cucumber as a lightweight, modern C++20 testing framework, simplifying test setup and execution.
Changelog
  • BUILD
    • Removed gherkin_library rule and replaced it with a filegroup for Gherkin feature files.
  • Gemfile
    • Removed the Gemfile, as Ruby dependencies are no longer needed.
  • Gemfile.lock
    • Removed the Gemfile.lock, reflecting the removal of Ruby dependencies.
  • MODULE.bazel
    • Removed cucumber-cpp, rules_gherkin, and rules_ruby dependencies, along with the Ruby toolchain and Bundler integration.
    • Added a new cwt_extension.bzl to fetch and integrate cwt-cucumber.
  • test/e2e/BUILD
    • Updated Bazel build rules by removing rules_gherkin and cucumber-cpp dependencies.
    • Changed the gherkin_test rule to a standard cc_test and added cwt-cucumber as a dependency.
  • test/e2e/context_storing_provider.cpp
    • Removed cucumber-cpp specific includes and ScenarioScope usage.
  • test/e2e/cwt_extension.bzl
    • Added a new Bazel module extension to define how cwt-cucumber is fetched and built from its GitHub repository.
  • test/e2e/steps/BUILD
    • Converted cc_gherkin_steps to cc_library, added C++20 compilation options, and updated the dependency from cucumber-cpp to cwt-cucumber.
  • test/e2e/steps/minimal_steps.cpp
    • Migrated Gherkin step definitions from cucumber-cpp syntax to cwt-cucumber syntax, including changes to includes, ScenarioScope replacement with cuke::context, and step definition macros.
Activity
  • No specific activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully migrates the testing framework from cucumber-cpp to cwt-cucumber, which is a great move towards a more modern and lightweight C++20 BDD framework. The changes involve removing the Ruby-based dependencies and build configurations, and replacing them with the new setup for cwt-cucumber. The updates to the Bazel build files and the C++ step definitions are consistent and correct. I have one suggestion to improve the maintainability and security of how the new cwt-cucumber dependency is fetched.

Comment thread test/e2e/cwt_extension.bzl Outdated
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Comment thread test/e2e/steps/BUILD
Comment thread test/e2e/cwt_extension.bzl Outdated
Comment thread MODULE.bazel Outdated
Comment thread BUILD Outdated
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Copy link
Copy Markdown
Contributor

@m-olko m-olko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wait for approval from @oxddr

Comment thread BUILD Outdated
NeaguGeorgiana23 and others added 2 commits March 26, 2026 08:13
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Comment thread MODULE.bazel Outdated
Comment thread MODULE.bazel Outdated
Comment thread MODULE.bazel Outdated
NeaguGeorgiana23 and others added 3 commits April 8, 2026 07:41
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <neagugeorgiana@google.com>
Signed-off-by: NeaguGeorgiana23 <115723925+NeaguGeorgiana23@users.noreply.github.com>
@NeaguGeorgiana23 NeaguGeorgiana23 merged commit 8522ae2 into main Apr 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants