Is Cucumber dying? Not so fast with this funeral!

Daniel Delimata
6 min readMay 4, 2023

Dawid Dylowicz likes ask serious questions. This time he asks if Cucumber is dying. The reason of this question is firing Mr Matt Wynne.

Dying Cucumber

WHERE WE ARE?

Cucumber is a popular tool for behavior-driven development (BDD), a software development approach that focuses on defining and testing the expected behavior of a system from the perspective of its users. Cucumber allows developers to write executable specifications in plain English, using a language called Gherkin, that can be easily understood by both technical and non-technical stakeholders. Cucumber also supports multiple programming languages, such as Ruby, Java, Python, and JavaScript, and can be integrated with various testing frameworks, such as Selenium, Capybara, Watir, and Appium.

Cucumber has been around since 2008 and has gained a lot of popularity and recognition in the software testing industry. According to the State of Testing Report 2020, Cucumber was ranked as the third most used test automation tool, after Selenium and Postman. Cucumber also has a large and active community of users and contributors, who provide support, feedback, documentation, tutorials, plugins, extensions, and more.

Let us add some more data about the community:

  • According to GitHub, Cucumber has over 13,000 stars and over 2,000 forks across its various repositories. This shows that Cucumber is still a well-known and respected project in the open-source community and that many people are interested in contributing to or learning from its codebase.
  • According to Stack Overflow, Cucumber has over 25,000 questions and over 50,000 answers across its various tags. This shows that Cucumber is still a widely discussed and supported topic in the software testing community and that many people are seeking or providing help or advice on how to use or improve Cucumber.
  • According to Google Trends, Cucumber has maintained a steady level of interest over time across different regions and languages. This shows that Cucumber is still a relevant and appealing topic for many people around the world who are curious or enthusiastic about BDD and software testing.

To make the picture better let us add some information about other tools which can be integrated with Cucumber:

  • Serenity BDD: A framework that provides reporting and living documentation capabilities for BDD projects
  • TestNG: A framework that provides annotation-based testing and parallel execution capabilities for Java projects
  • JUnit5: A framework that provides extension model and dynamic testing capabilities for Java projects
  • Allure: A framework which support reporting test results.

There are several Gherkin projects not maintained by Cucumber.io (see https://cucumber.io/docs/installation/):

  • Behat (for PHP)
  • Behave (for Python)
  • SpecFlow (for C#)
  • Cucumberish (for iOs, Swift, ObjectiveC)
  • Cucumber-Rust (for Rust)
  • Test::BDD-Cucumber (for Perl)
  • GoBDD (for Go)
  • unencumbered (for D)

As we can see there are a lot of people interested in maintaining such tools. They wouldn’t do it if it wasn’t worth it.

THE ROLE OF CUCUMBER IN THE PROCESS. IS IT NECESSARY?

First, let’s take a look at the value of this tool. I have written about it in several posts, but let’s revisit it again. Cucumber is a tool for BDD, which is something broader than just the tool. It’s a kind of philosophy, and its main value is communication. Cucumber only organizes one aspect of this communication — the links between the test steps and the automation code.

Do we need this tool? Well, it’s helpful but not necessary. Let’s imagine that we have to remove Cucumber from our projects. Is it a disaster? No. Is it a problem? No. Is it a simple task? Yes, let’s take a look at it.

We have to change this (sample code, without any deeper business logic):

Feature: F02 Searching – Clearing of searching criteria

Scenario Outline: Clearing of searching criteria
Given The user is on the page
When the user enters the value "<Search>" in the text-input
And the user selects value "<Column>" in the drop-down
And the user sets case sensitivity switch to "<Case>"
And the user clears filters
Then the user should see that search criteria are cleared
And the user should see that the search result summary is as in the very beginning

Examples:
| Search | Column | Case |
| Alice | Name | True |
| alice | Name | False |
| alice | Name | True |
| 1 | Id | True |
| 2 | Id | True |
| 3 | Id | True |
| 4 | Id | True |
| company | Email | False |
| Athens | City | True |

… into this:

    private static Stream<Arguments> clearingOfSearchingCriteriaData() {
return Stream.of(
arguments("Alice", "Name", "True"),
arguments("alice", "Name", "False"),
arguments("alice", "Name", "True"),
arguments("1", "Id", "True"),
arguments("2", "Id", "True"),
arguments("3", "Id", "True"),
arguments("4", "Id", "True"),
arguments("company", "Email", "False"),
arguments("Athens", "City", "True")
);
}

@ParameterizedTest
@MethodSource("clearingOfSearchingCriteriaData")
@Feature("F02 Searching – Clearing of searching criteria")
public void clearingOfSearchingCriteria(String search,
String column,
String caseSensitiveness) {
theUserIsOnThePage();
theUserEntersTheValueInTheTextInput(search);
theUserSelectsValueInTheDropDown(column);
theUserSetsCaseSensitivitySwitchTo(caseSensitiveness);
theUserClearsFilters();
theUserShouldSeeThatSearchCriteriaAreCleared();
theUserShouldSeeThatTheSearchResultSummaryIsAsInTheVeryBeginning();
}

Rocket science, right? Let’s be honest. This isn’t a task for thinking; it’s simple manual work.

Do we still have BDD? In my opinion, yes, we do. The only disadvantage is that we don’t have a nice tool that links everything for us on the fly and generates snippets. However, we can still efficiently report our test results and cooperate in a BDD way.

WHAT CAN BE THE FUTURE OF CUCUMBER?

I can imagine testing without Cucumber, but I do believe that this will not happen.

We can consider the following scenarios:

  • Scenario 1: The Cucumber project will continue to exist and operate as an open-source project, relying on the contributions and support of its existing or new users and developers. This scenario is optimistic and hopeful, but it may also be challenging and risky. It would require a lot of dedication, coordination, and collaboration from the Cucumber community to keep the project alive and updated. It would also depend on the availability and quality of the resources, such as documentation, tutorials, plugins, extensions, etc., that the Cucumber project provides or relies on.
  • Scenario 2: The Cucumber project will be acquired or adopted by another company or organization that will take over its development and maintenance. This scenario is realistic and plausible, but it may also be uncertain and unpredictable. It would depend on the intentions and capabilities of the new owner or sponsor of the Cucumber project. It could be beneficial or detrimental for the Cucumber community and the software testing industry depending on how the new owner or sponsor would manage or modify the Cucumber project.
  • Scenario 3: The Cucumber project will be discontinued or abandoned, leaving its users and developers without any official support or updates. This scenario is pessimistic. I personally consider it as very unlikely.

Do you remember the story of OpenOffice? After being taken over by Oracle, the project had official maintainers, but the community preferred to create a fork. The frequency of releases for LibreOffice is better than in the original OpenOffice project (see https://www.linux-magazine.com/Online/Features/LibreOffice-vs-OpenOffice). Now, LibreOffice is the default office suite for most popular Linux distributions. As we can see, maintaining a project by the community can be very efficient.

SUMMARY

I do believe that the community is interested in maintaining this project. There is a great group of people and projects that consider this tool useful and are interested in keeping it alive. Paraphrasing a famous misquote, we can say that the reports of Cucumber’s death are greatly exaggerated.

The story was originally created by me, but it may contain parts that were created with AI assistance. My original text has been corrected and partially rephrased by Chat Generative Pre-trained Transformer to improve the language.

--

--

Daniel Delimata

Test Automation Engineer | Typesetter | Testing Teacher