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

How to tell which files are being transpiled by Babel 6?

I have a project that is using babel-register to dynamically transpile ES6 source to ES5 when requiring that module in a Node 6.6 project. I've read that babel-register hooks into Node's require function in order to transpile a file when you try to…
Kyle Krull
  • 1,618
  • 2
  • 18
  • 25
3
votes
1 answer

Protractor Fails on Build Server - ElementNotVisibleError

All my angular e2e tests using protractor with cucumber are running smooth and fine on my machine. But as soon as I run the tests on the build server, I get an error ElementNotVisibleError: element not visible Session info: chrome=51.0.2704.84…
timtos
  • 2,225
  • 2
  • 27
  • 39
3
votes
1 answer

How to get cucumber-test.json from protractor [3.0.0] and cucumber latest version

module.exports = function JsonOutputHook() { var Cucumber = require('cucumber'); var JsonFormatter = Cucumber.Listener.JsonFormatter(); var fs = require('fs'); JsonFormatter.log = function (json) { …
prat meh
  • 31
  • 1
3
votes
1 answer

Error while selecting radio button option using protractor and cucumberjs

I am new to the world of automating tests on angular pages. The framework I am using is protractor, but I am clubbing it with cucumberjs. I am trying to click on a radio button. This is how the element looks like in the DOM :-
3
votes
1 answer

cucumberOpts.tags usage with Protractor + CucumberJs + Gulp

Hello All! I've the following versions installed: "protractor": "~2.5.1", "gulp-protractor": "1.0.0", "cucumber": "~0.7.0", I had installed this, because the project has version < 4 of NPM and Protractor 3.0.0 needs that. And I have the follwing…
3
votes
1 answer

Chimpjs and Meteor: method calls in tests without using Velocity

This app shows an example of testing Meteor with Cucumber: https://github.com/mhurwi/cucumber-meteor-tutorial It works well with Velocity. But my computer becomes very slow when starting an app with Velocity and I don't want it to always run when…
Victor Deplasse
  • 682
  • 6
  • 10
3
votes
0 answers

Can't debug using cucumber.js plugin in IntelliJ

I've set up Cucumber.js plugin according to https://www.jetbrains.com/idea/help/run-debug-configuration-cucumber-js.html It is title Run/Debug. Run part works. Debug - doesn't. The button is just disabled. Is that right? I saw this Cucumber.js…
Pasho
  • 488
  • 3
  • 15
3
votes
3 answers

Is there a way to continue test scenario execution after step failure in a previous scenario?

Whenever there is a step failure while running on a remote server, I would like to capture the failed step and then continue running the remaining scenarios. The captured step would then be included in a file for reporting purposes. Is this a…
Jessica Wood
  • 123
  • 1
  • 8
3
votes
2 answers

How does one use Q.all with chai-as-promised?

The chai-as-promised docs have the following example of dealing with multiple promises in the same test: it("should all be well", function (done) { Q.all([ promiseA.should.become("happy"), …
RichardTowers
  • 4,682
  • 1
  • 26
  • 43
3
votes
2 answers

Cucumber-java vs. Cucumber.js

My team is developing a Java web system using the Play framework and implementing Angular.js throughout. My question is, should I use Cucumber-java or Cucumber.js for automated BDD functional testing? What are the pros and cons of each when using…
Chris Traynor
  • 460
  • 1
  • 5
  • 14
3
votes
3 answers

In Cucumber.js is it possible to list all of the available steps?

Other versions of cucumber, it is possible to dump a list of all steps. However this is not supported in javascript. For example: cucumber -f usage --dry-run If you can get access to the World object or Cucumber, I think there might be a way to…
bryce
  • 763
  • 6
  • 13
2
votes
1 answer

Custom message for failed assertion in playwright (using cucumber.js)

In project I use node js 20.5.1, playwright 1.37. with cucumber 8.0.0. I want to add own customer message if expected method return me a failed. I thought I could do it like below: expect(3),"My custom message").toBeLessThanOrEqual(2); And in test…
Marcin
  • 97
  • 7
2
votes
2 answers

How to capture the 'latest' instance of a request if it is called multiple times during a Cypress test?

In my Cypress Cucumber test, here is my current feature file scenario (this scenario fails on the final step): Given I log in Then I am on the dashboard And the dashboard displays 0 peers (@Peers is called here, & 0 is the correct value here) When I…
user9847788
  • 2,135
  • 5
  • 31
  • 79
2
votes
0 answers

Code coverage when running e2e tests on a project with Angular 14 (TypeScript & ESM) + Playwright + Cucumber + nyc

I cannot generate code coverage when I am running my e2e tests. It seems that there is no instrumentation done in this case. I have created a sample app for which I am running one cucumber+playwright test but afterwards I get no coverage…
DDana
  • 117
  • 8
2
votes
1 answer

driver.execute() TypeError elem[prop] is not a function in NodeJs WebdriverIO

I am trying highlight a element. Please help me on this code. (I am a beginner to nodejs) class Utilities { async highlight(element){ await browser.execute((userelement)=>{ …