Questions tagged [cucumberjs]

The Cucumber project is a Behavior Driven Development (BDD) tool originally designed to work with Ruby. However, since its inception its popularity has grown and there have been implementations of Cucumber written for different languages including Java, .Net, Flex, and JavaScript.

Cucumber understands a language named Gherkin which allows features and specs to be written in a plain text format. It is a Business Readable, Domain Specific Language that lets you describe software’s behaviour without detailing how that behaviour is implemented.

Gherkin serves two purposes — documentation and automated tests. The third is a bonus feature — when it yells in red it’s talking to you, telling you what code you should write.

Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. The grammar exists in different flavours for many spoken languages (37 at the time of writing), so that your team can use the keywords in your own language.

848 questions
6
votes
2 answers

Cucumber js in visual studio 2013

Is there a project with similar goals as Specflow is to cucumber in Visual Studio, but for cucumberjs? I'm considering a unit testing / bdd framework for Visual Studio. Cucumberjs seems like the obvious choice as I am using Specflow to test the c#.…
Alex KeySmith
  • 16,657
  • 11
  • 74
  • 152
5
votes
0 answers

Using playwright UI mode with Cucumber

Recently Playwright implemented new UI mode which could be runned with npx playwright test --ui I'm using cucumber-js with Playwright. Is any way to run cucumber tests with playwright in that --ui mode? I tried to run cucumber-js with that flag, but…
Mi4i0
  • 51
  • 1
5
votes
1 answer

What is the best way to get coverage stats in cucumber js?

I'm designing my tests using the Behavior Driven Development (BDD) approach using Gherkin syntax and running my tests with Cucumber JS. I'm using Cucumber Studio to share reports and keep synced with my business stakeholders, and…
Chootti
  • 357
  • 3
  • 15
5
votes
1 answer

Protractor: How to resolve promise and stop skipping of scenarios if one scenario fails

I have a Protarctor-CucumberJS framework and a suite of test scenarios. When I execute the entire suite, one script fails at an expect (ChaiJS) statement. Scenario 1 : Passed Scenario 2 : Passed Scenario 3 : Failed (Unresolved Promise) Scenario…
Harisha K P
  • 327
  • 2
  • 7
  • 19
5
votes
2 answers

How to rerun the failed cucumber scenarios in protractor?

As a part of testing, i was using typescript language to develop the code which will be compatible for protractor, i was using BDD framework in which i had defined some cucumber options in my config.ts as following: capabilities: { specs:…
Suri Suraj
  • 51
  • 1
  • 2
5
votes
1 answer

Angular does not work in docker because it can not find module @angular-devkit/build-angular

I tried ignoring the node_modules but still is not working for me ,even after ignoring the node_modules im still facing the same error yaml file: version: '3.5' services: angular-docker: hostname: localhost container_name:…
Venkat
  • 51
  • 1
  • 2
5
votes
3 answers

Pass data from one step to the next synchronously

Running Cypress 3.1.1 with cypress-cucumber-preprocessor 1.5.1. I need to pass some static data from one step to another (in the same scenario/test). I can do this using an alias, like this: cy.wrap(someString).as('myString'), but then I have to…
hackel
  • 1,181
  • 1
  • 14
  • 21
5
votes
1 answer

babel compiler with cucumber.js version 4

with cucumber@1, I could run tests that needed transpiling like this cucumberjs --compiler js:babel-core/register but that doesn't work with cucumber@4 node_modules/.bin/cucumber-js --help doesn't list the --compiler option anymore it doesn't…
Alex028502
  • 3,486
  • 2
  • 23
  • 50
5
votes
2 answers

WDIO Automation. Spec symbols are missed in set text after update chrome browser

After update chrome browser to the Version 62.0.3202.75 (Official Build) (64-bit) spec symbols are missed in set text and browser settings page is opening unexpectedly on enter spec symbol or capital letter. Tests are based on WDIO…
Oksana
  • 51
  • 4
5
votes
0 answers

How to run Cucumber test in NodeJS which is written in Typescript and ES6

What is the proper way to run CucumberJS BDD test written in Typescript and ES6. I want to first transpile typescript code to es6 then use babel to make it es5. I can run it from npm test like node_modules/.bin/babel-node…
Foysal Osmany
  • 1,471
  • 14
  • 17
5
votes
2 answers

Cucumber BDD browser testing – handling different buttons with same name but different css?

I am trying out cucumber for browser testing and am learning about BDD testing for the first time – so i am quite a beginner to BDD. I have encountered a problem and would like to know the best-practice way of solving it. (I am using it for a…
DisplayName
  • 765
  • 6
  • 17
5
votes
1 answer

Using Protractor with loops to fill in a form getting data from a Cucumber.js table

(I have seen this SO discussion, but was not sure how to apply it to my case, so I’m asking a new question. Hope it’s not a duplicate) I am testing a form written in Angular using Protractor with Cucumber.js. So what I would like to do is to tell…
azangru
  • 2,644
  • 5
  • 34
  • 55
5
votes
2 answers

cucumber.js for BDD unit testing?

I am wondering if it is possible to use cucumber(js) for BDD unit testing? Cucumber is known to be runable as a acceptance testing framework. But I have never seen examples if and how cucumber may be used as a BDD unit testing. Is cucumber able to…
cilap
  • 2,215
  • 1
  • 25
  • 51
5
votes
1 answer

Are Cucumber step definitions global?

I am just learning Cucumber and notice that if two completely seperate features have two steps that are accidentally worded the same, Cucumber suggests only one step definition for them. Does this mean that step definitions are global and they are…
Naresh
  • 23,937
  • 33
  • 132
  • 204
5
votes
3 answers

How to run only one feature file when running protractor with cucumber?

I have multiple feature files and I would really love to run just one file or just one scenario or just one tag. I know I could just provide one file in my specs in my cucumberConf.js, but I would like to run it once without fiddling with my…
Capaj
  • 4,024
  • 2
  • 43
  • 56
1 2
3
56 57