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
0
votes
1 answer

Evaluating cucumber tags in BeforeFeature hook

I am trying to evaluate the tagged features in the this.BeforeFeature hook in world file but I am getting the error 'TypeError: handler is not a function' . What I interpret from the error message is that this.BeforeFeature() takes function as…
Galileo123
  • 185
  • 4
  • 17
0
votes
0 answers

Setting order of features to be run

How do you set the order of features to be run in CucumberJS since what happens now is that it tests my login feature before my registration feature. I've tried looking for docs on this topic but nothing came out. Else I'll be using grunt to target…
JLawrence
  • 192
  • 5
  • 22
0
votes
0 answers

Benefits of CucumberJS w/ Protractor

I am trying to understand why Cucumber would be used with Protractor. I understand that the Gherkins is a plus because it makes the tests easier to read, but cant tests be kicked off and written with pure protractor? What other benefits does it…
Tree55Topz
  • 1,102
  • 4
  • 20
  • 51
0
votes
1 answer

Firefox not ignoring cucumber feature

I'm having a lot of trouble running a Gherkin scenario in firefox. The example is running perfectly in Chrome. Capabilities in my wdio.conf.js capabilities: [{ // maxInstances can get overwritten per capability. So if you have an in-house…
0
votes
1 answer

Not able tio install WebdriverIO Cucumber JS framework on windows 7 64 bit

npm install wdio-cucumber-framework --save-devfails with this error. same happens for wdio-mocha-framework.Looks like something wrong with node fibers. fibers@1.0.15 install C:\src\webdriverio-browserstack\node_modules\fibers node build.js ||…
Prasanjit
  • 285
  • 2
  • 6
0
votes
1 answer

while running the config.js file the results appear without even execution starts but the result takes nanoseconds to complete

below provided is the config file and the stepdefinition file. after running it says 2 scenarios (2 passed) 7 steps (7 passed) 0m00.001s E/launcher - expected 'Hello Ayush!' to equal 'Hello Rahul!' Process exited with error code 199 var chai =…
0
votes
1 answer

Running Protractor in parallel -

I'm using the protractor-cucumber framework which comes decoupled from protractor. My protractor version 4.0.9 which got pushed out last night. My issue: When running protractor in parallel with: protractor protractor.conf.js the generated results…
pelican
  • 5,846
  • 9
  • 43
  • 67
0
votes
0 answers

Testing from different countries with protrator

I want to do one test using protractor to check one website in different countries. For example: Scenario - Visitors get the expected language on first load Given: a visitor with IP from |UK| …
0
votes
1 answer

Handling modal pop-up in protractor (with cucumber js)

I'm using Protractor (with Cucumber js) for E2E testing of an application. I'm trying to test a negative scenario with it i.e. when the user enters a duplicate value for creating an object, it should not get created, and the user should get an error…
Shubhang
  • 297
  • 1
  • 5
  • 13
0
votes
0 answers

Setting up Protractor with cucumberjs (protractor-cucumber-framework)

cucumberjs --version 1.2.2 protractor --version 4.0.1 Both installed globally via npm I tried following these 2 links to set up my Protractor with newer cucumberJs: Protractor-cucumber-framework:…
pelican
  • 5,846
  • 9
  • 43
  • 67
0
votes
0 answers

cucumber shows step-def to be implemented even when it is implemented

I am using cucumberjs and protractor framework for test my angular website. I have a question regarding cucumber- everytime I run a single feature using cucumber (example cucumber "feature/abc.feature") it gives me a set of step-definitions that…
Galileo123
  • 185
  • 4
  • 17
0
votes
1 answer

Need Step Information in report.json for Protractor-cucumber tests

I'm using "protractor-cucumber-framework" to use Cucumber along with Protractor for automation(Using CHAI as Assertion Library). I'm using resultJsonOutputFile: './report.json' to generate a JSON log report. I can not see step information in the…
0
votes
2 answers

Protractor-Cucumber Background Hook

We are using a test Protractor-Cucumber BDD test framework. Does Cucumber js not support 'Background' hook? I am trying a scenario like shown below: Background: Given an authenticated user Scenario Outline: test something Given the home page is…
Manya
  • 315
  • 4
  • 17
0
votes
1 answer

CucumberJS/Protractor build result report not showing screenshot when run on Jenkins

I am using CucumberJS/Protractor, and successfully manage to generate html report with screenshots upon failure (after encoding screenshot image to base64). This is on local machine. However Jenkins does not insert this image into the report, due…
jaffamoney
  • 31
  • 8
0
votes
1 answer

protractor shardTestFiles with cucumberOpt.tags starts unnecessary webdrivers

I've noticed that when I use the shardTestFiles option to execute cucumber feature files in parallel across each browser type in multiCapabilities, it fires up a webdriver for each spec file + browser combo. This happens regardless of whether the…
AndrewV
  • 1
  • 1