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
4
votes
2 answers

TypeScript Module Resolution doesn't quite work with Cucumber-js

I'm doing a small Proof of Concept for Cucumber-js – using TypeScript. So far everything is fine...but I can't find a way to properly configure the module resolution when using tsconfig-paths. This is my project structure: . ├── cucumber.js ├──…
x80486
  • 6,627
  • 5
  • 52
  • 111
4
votes
1 answer

Cucumber-js undefined step reference using IntelliJ IDEA - Ultimate Edition

Steps in feature file are highlighted saying: "Undefined step reference: The following elements are visible on "logIn" page less... (Ctrl+F1) Inspection info: Highlights steps in Cucumber (or some other Gherkin) .feature files which do not have a…
4
votes
2 answers

How to verify selector NOT present in cucumberjs / puppeteer?

I'm trying to verify selector NOT present in cucumberjs / puppeteer. How do you use the throws assertion using cucumber-assert? I'm working on test automation to support testing an ember front-end application. I'm using cucumberjs, puppeteerjs,…
Huckleberry Carignan
  • 2,002
  • 4
  • 17
  • 33
4
votes
1 answer

How to make browser close and open for each scenario in a feature - protractor and cucumberjs

This question might be a duplicate, but i am not as expected, so raising again. I am creating a new protractor framework in our project. My application has login screen which i need to login with different user details for each case in a feature. I…
mmar
  • 1,840
  • 6
  • 28
  • 41
4
votes
0 answers

Detox Tests Hang in BeforeAll Hook for Android, but not iOS

Description Detox tests are hanging on the init call on Android emulator. The app is installed on the emulator, but never launches. The same tests execute over the same application on the iOS simulator. I am using Cucumber for the test runner and am…
STLCards77
  • 121
  • 14
4
votes
1 answer

Scenario Outline is not working with CucumberJS

I am practicing CucumberJS with WebDriverIO and testing http://webdriver.io. I had following feature file and step definition and this was working fine. Feature File Feature: Application Title Page title should be context sensitive …
Bilal Mirza
  • 2,576
  • 4
  • 30
  • 57
4
votes
1 answer

How do you debug the cucumber step definitions w/ Visual Studio Code?

I'm using the protractor-cucumber-framework to create a testbed environment for our QA team. I've searched around and been able to find zero help in implementing VS Code's debugging capability for use in this code. Has anyone does this? I'd really…
user7614197
4
votes
2 answers

Generate HTML report for WebdriverIO/Cucumber framework

I am using WebdriverIO/Cucumber (wdio-cucumber-framework) for my test automation. I want to get the test execution result in a HTML file. As of now I am using Spec Reporter (wdio-spec-reporter). Which helps to print the results in console window.…
Thangakumar D
  • 714
  • 5
  • 12
  • 27
4
votes
4 answers

Cucumber Expressions: How do I have strict, multi-word alternative text?

I'm trying to convert my RegExp based Cucumber v1 step definitions into Cucumber Expression based Cucumber v2.0.0-rc.9 step definitions. I have a few step definitions that use regular expressions like the following: /^I (?:am on|go to) the "([^"]*)"…
Nathan Thompson
  • 2,354
  • 1
  • 23
  • 28
4
votes
2 answers

How I can start IE in 32bit mode in webdriver.io

I am running an WebDriver.io test using gulp-wdio npm pakage on selenium-standalone The Code that I run in gulp is: gulp.task('e2e', function () { return gulp.src('wdio.conf.js') .pipe(wdio({ wdio: { specs:…
OBender
  • 2,492
  • 2
  • 20
  • 33
4
votes
1 answer

Webdriverio cucumber cant use promises

I m trying to learn a bit more cucumberjs with webdriverIO and I m having some troubles while launching my tests. Actually, I want to cover this simple feature : Feature: Example Feature In order to become productive As a test automation…
mfrachet
  • 8,772
  • 17
  • 55
  • 110
4
votes
3 answers

function to take screenshots for cucumber-html-reporter generates "function timed out after 5000.." error

I am using protractor-cucumber-framework and I wanted to generate html report for the tests I wrote. I decided to use cucumber-html-reporter to achieve it. In my hooks.js I wrote a this.After object to take screenshot on test failure: …
bartleo
  • 41
  • 1
  • 2
4
votes
2 answers

Stop cucumberJs when scenario fails - protractor and cucumberjs

I want to stop cucumber from running a failing test till the end because that wastes time for our continuous integration since we need rapid feedback. I am using the javascript implementation of cucumber, cucumberJs with protractor. Here's what I…
pelican
  • 5,846
  • 9
  • 43
  • 67
4
votes
1 answer

Protractor/cucumberjs rerunning failed tests/cucumber features/specs

Given that automated UI tests sometimes fail due to flakiness, an ability to rerun only the failed tests becomes incredibly useful in a framework like protractor. Unfortunately, as of 09/13/2016, there's no way to rerun failed tests with…
pelican
  • 5,846
  • 9
  • 43
  • 67
4
votes
1 answer

In WebStorm, can't navigate from .feature file to step definitions in a nonstandard directory

WebStorm doesn't navigate from a .feature file to the function declaration in stepDefinition.js if the name of the folder is stepDefinitions. It works fine if the folder name is step_definitions. Is there a setting in WebStorm that I can change so…
Kapil Chokhawala
  • 196
  • 2
  • 10