Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • May 15 19:50
    akifsonmez starred cucumber/cucumber-js
  • May 15 17:14
    nguyentramy87 starred cucumber/cucumber-js
  • May 15 14:14
    davidjgoss milestoned #2040
  • May 15 14:13
    davidjgoss edited #2040
  • May 15 14:12
    davidjgoss labeled #2040
  • May 15 14:12
    davidjgoss labeled #2040
  • May 15 14:12
    davidjgoss opened #2040
  • May 15 11:46

    davidjgoss on api-docs-rework

    docs: fix typo in tag expressio… fix return type of step hook fu… Release 8.2.1 and 1 more (compare)

  • May 14 13:52
    shiv-jirwankar starred cucumber/cucumber-js
  • May 14 11:30
    davidjgoss commented #2037
  • May 14 11:29
    davidjgoss closed #2039
  • May 14 11:12

    github-actions[bot] on v8.2.1


  • May 14 11:12

    davidjgoss on v8.2.1


  • May 14 11:10

    davidjgoss on main

    Release 8.2.1 (compare)

  • May 14 10:20
    sonhaichu starred cucumber/cucumber-js
  • May 14 09:52

    davidjgoss on step-hook-type


  • May 14 09:52

    davidjgoss on main

    fix return type of step hook fu… (compare)

  • May 14 09:52
    davidjgoss closed #2038
  • May 14 09:52
    davidjgoss closed #2037
  • May 12 18:42
    coveralls commented #2038
Avik Hazra
thank you
Sumit Saxena
Iam using multcapabilities to run cucumber test in parellel but still it running it in sequential manner
Sumit Saxena
@abhinaba-ghosh HI Abhinaba , Iam trying to execute multiple test scenario in parellel , tried with multi capabilities multiCapabilities: [{
"browserName": prop.get('browserName'),
'shardTestFiles': true,
'maxInstances': 2
but still it execute sequentially , anything Iam missing
Abhinaba Ghosh
Hi, currently protractor supports parallel feature files execution, not scenario. If you want to try that out, you can checkout this starter kit : https://github.com/abhinaba-ghosh/protractor-cucumber-serenity-typescript-starter

Hello everyone, I hope this is the right place to ask this question. I'm running @wdio/cucumber-framework, but maybe those of you familiar with cucumber-js will be able to see the problem. I've defined and set a custom World constructor, and it is being re-constructed with each scenario as expected, as I can see by a console.log("Constructing world") inside the custom constructor function. However: Each scenario is able to somehow modify the subsequently constructed object rather than having it re-constructed with defaults as specified, and the modifications don't get overwritten for the new scenario. world.js looks like this:

const options = {loginBusinessOptions: {
    login: "abc",
    password: "xyz"

function CustomWorld() {
    console.log("Constructing world");
    console.log("options.loginBusinessOptions is " + JSON.stringify(options.loginBusinessOptions));
    this.nav = {};
    // this.context=options;

export default CustomWorld

Observe output of running a scenario twice, where the first scenario sets "this.context.loginBusinessOptions.login='new login' instead of its original value 'abc' as set in the 'options' object above, showing that the 'options' object has been overwritten by the 1st scenario's setting of this.context.loginBusinessOptions.login.

This happens whether the custom constructor simply sets 'this.context=options' or does an Object.assign to prevent the two objects being treated as the same object.

[0-0] Constructing world
[0-0] options.loginBusinessOptions is {"login":"abc","password":"xyz"}
[0-0] ***this.context.loginBusinessOptions is {"login":"abc","password":"xyz"}
Constructing world
options.loginBusinessOptions is {"login":"new login","password":"xyz"}
***this.context.loginBusinessOptions is {"login":"new login","password":"xyz"}

There is a reproducible example of this here: https://github.com/osmolyar/wdio_cucumber_world_not_reinitialized . or - if this does not happen with cucumber-js, it can be narrowed down to a @wdio/cucumber-framework issue. Thanks in advance for any guidance.

How can I use data transformation for "docstring"?
I make this:
but this only works for usual parameters, not for docstring
Kirill Eremin
Hello! Help me please. Maybe you have so problem?
After launching tests we have blank chrome window and error: this is not defined for functions inside Given, Then, etc...
It's strange because all my teammates don't have so problem.
The version of nodejs is 12.13.0 and OS is MacOS Catalina
Hi ,
Does cucumber with typescript support @and decorator?
chromedriver 83 has been released so if we are not able to get it through package.json then delete entry of chromedriver from package.json and do force download through following command npm install chromedriver --chromedriver-force-download
@StaroKep Hi, Can it be reproduced on other OS? For example, Windows
Kirill Eremin
@Dmytro89_gitlab It's strange, but after xcode updating, all works fine
Hello! What is the best solution(framework) for API testing with Cucumber-js? Thanks!
Abdul Aziz
@a22183nj , @ThomasGHenry , is your setWorldConstructor() being called from a step definition file?
Abdul Aziz
Can someone help me please, I am new to automation. I have set up framework using selenium web driver , BDD cucumber using node JS. I have a feature file with 2 scenarios. It successfully runs the first one but with the second one or just opens up a browser. I have a steps page and object page. What do I need to do on order for both scenarios to run please. Thanks
how do you run the feature file?
is there any error you get?

Hello! What is the best solution(framework) for API testing with Cucumber-js? Thanks!

We are using SuperTest and cucumber.

@skirep Thank you!
Abdul Aziz
@ricardgarcia I don't get no error . I just run command npm test. It runs the first scenario but does not run second scenario
try running npm test --specs <name of your feature file> @abdulazizkarim11
Question from the wdio-cucumber-framework viewpoint - does cucumber.js expose 'world' in before/afterScenario hooks?
@StaroKep , are your step definitions defined as arrow functions? In that case they won't have access to a 'this'
Morning, how or what is the approach in cucumber js to close and restore the browser after each scenario in a feature? Similar to what mocha (webdriverio) does between each test? Or it is a different understanding to appreciate? I can quit() and closeSession() in a hook no problem but bringing back the browser(s) to start next session isn't so clear how to best achieve this. Any guidance please? I'm using WDIO v6
found it, simple browser.reloadSession() in the global hooks, does the trick nicely! :)
Anyone explain how to pass a reference in.. something like this (doesn't work in cucumber syntax)
Given I want "browserA" to refresh
Given(/^I want "([^"]*)" to refresh$/), (browserN) => { browserN.refresh() })
I've clearly misunderstood how to pass this in correctly, I achieve a similar approach with Mocha WDIO, where we have multiremote in use, and send commands across different running browsers (users). How do I do something similar in cucumberJS? thanks in advance
How to deliberately fail the cucumber step because the functionality failed
found it using eval() on browser, to get the obj not the string :( doh
Daniel Montesinos
Hello! does somebody know if is it possible to define our own custom table types, like java version does: https://github.com/cucumber/cucumber/tree/master/datatable#custom-table-types
??? thanks!!
Kirill Eremin


@StaroKep , are your step definitions defined as arrow functions? In that case they won't have access to a 'this'

We don't use arrow functions. We use function(){...}.
We updated Xcode and all started work fine. It's strange, but it helped us to solve the problem.

Hi guys!. I have a question. I am new at "Cucumber-js" For execute your tests in node js. what command line do you use?. How to configure my proyecto for only execute "cucumber-js src/features/login.feature" ?. I'm using only cucumber and gRPC for API test.
Rahul Sharma
Hi All, Is there a way to update cucumber.json report after or during execution? I want to add some meaningful text along with the error message for failed steps.
Priyanka Kondajji
This was all good. I had removed arrow functions and was working fine. But from yesterday, I get this TypeError: this.attach is not a function. and also while comitting the code, i get as "Unexpected unnamed async function (func-names)"
When('Post a transition , async function() { this.attach(Transition with payload: ${JSON.stringify(payload, undefined, 4)});
Joe Gornick
Hey folks, using wdio w/ cucmberjs and was wonderig if there was a way to inject values into the datatable at runtime so that when we get to beforeScenario, the scenario is compiled with the new datatable values?
I keep getting these types of errors when a timeout is reached function timed out, ensure the promise resolves within 120000 milliseconds when running tests via saucelabs. I'd like to see what element it failed on so I don't have to go into saucelabs see the error there. Is there anyway to have a more useful timeout message?
Hi All,
When I'm integrating cypress with cucumber I'm ending with the following error
1 reply
can anybody help me on this?
folder structure is as follows,
Hello everyone, is there any way to run the cucumber feature files multiple times in afterFeature hook in Webdriver IO?
Josemy Duarte
Hi pps! Quick question.. Does anyone know how to make work cucumber.js with path aliases? I'm having this problem: