Questions tagged [cucumber]

Cucumber is a tool for running automated acceptance tests written in a BDD (behaviour-driven development) style.

Filter by
Sorted by
Tagged with
-1
votes
1answer
13 views

I am trying to implement Extent Report in Cucumber project with Cucumber Event Publisher class but getting exception

I am trying to create Extent Report in cucumber project with EventPublisher class. Basically took help from How to implement Extent report in Cucumber using EventListener and Where to find ...
1
vote
3answers
63 views

Tests that cannot be automatable in BDD model but can be automatable in TDD model

I have been to a interview. The interviewer said they were using BDD model in their project. He asked me this question. Define some Tests that cannot be automatable in BDD model but can be ...
-1
votes
1answer
29 views

Still Getting Element is not currently visible and so may not be interacted with Can some one pls give your inputs

I am getting the above error : Below is the xpath : String MeetingTypedropdown = "//*[@id='meetingDatesForm:meetingDatesTable_data']/tr["+(i+1)+"]/td[3]//div[3]/span"; PageUtil....
0
votes
1answer
22 views

Checkbox gets unchecked even though the Code is written to only select the checkbox..can someone pls help

Scenario: On the Screen once I navigate I have to click on the checkbox the first time only... Next time when I run the script the checkbox should not be unchecked.... but Issue: First Time if the ...
0
votes
0answers
18 views

In the screen how to navigate to the row which contains the text that needs to be Edited and then click on Edit button.Can some one pls guide.NeedHelp

In the screen how to navigate to the row which contains the text that needs to be Edited and then click on Edit button. Scenario: I have a screen where I need to find the row which has the value as &...
0
votes
1answer
35 views

Not able to click Search button and also select the option from the drop down Getting .ElementNotVisibleException

Not able to click Search button and also select the option from the drop down Getting: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted ...
-2
votes
0answers
28 views

I need to create a script to enter unique property name every time I run the script

I need to create a script to enter unique property name every time I run the script. I cannot use the UUID.randomUUID().toString() as I need to enter not more than 6 characters. I can enter the value ...
0
votes
1answer
33 views

How to check in the page if the name exists and then increment a unique name

I have a scenario where I need to add new username everytime is run the script. For instance, if the last time I had added a name as test1, then next time when I add another name I should not add ...
0
votes
1answer
25 views

Getting java.lang.NumberFormatException: For input string: “517838839328”

PageUtil.clickOnButton(driver, AppXPathsConstants.UserAdminAddNewuser); String id ="1517838839328"; String newid = "1517838839328" + (Integer.parseInt(id.substring(1,id.length()))+...
0
votes
1answer
20 views

Supported Automation Framework for an Outsystems developed application

In my company development team has started using tool called "Outsystems " which has less code and less managing issue while developing . So I wanted to know from QA side if anyone's company ...
2
votes
1answer
920 views

java.lang.UnsupportedClassVersionError -CucumberJvm4SMFormatter -Java runtime Version error

My testing framework is built with Cucumber, TestNG, Java 1.8 and Maven I recently updated my IntelliJ IDE Details: IDE : IntelliJ IDEA Ultimate 2020.3 - Runtime version : 11.0.9 Cucumber is ...
0
votes
0answers
8 views

In Eclipse only, Cucumber feature steps are not getting recognized with step definitions [duplicate]

This is my runner class: @RunWith(CucumberWithSerenity.class) @CucumberOptions(features = "src/test/resources/features/" ,glue={"stepdefs"} ,dryRun=false ,monochrome=...
1
vote
2answers
100 views

Which runner to use with Specflow Cucumber BDD: Specflow Runner, Nunit, Xunit

I have a Specflow Selenium BDD automation solution in C# using Visual Studio and want to start scheduling some automation runs based on tags and possibly features. I've only used Nunit as a test ...
0
votes
1answer
45 views

Automated testing of Google Pub/Sub

I'm new to test automation and Google Pub/Sub. I'm developing automation scripts for regression testing. My automation framework is built with Java, Maven, Cucumber and TestNG My application is a ...
0
votes
1answer
483 views

Why is my Feature File failing to find the Step Definition?

I have the following Feature File which is grayed out so I cannot run it from an IntelliJ Run configuration, nor from the right click context in the Feature File, though it runs fine from the Run.java ...
1
vote
2answers
99 views

Specflow Cucumber BDD - Only log in once on test run not on every scenario

We have a Cucumber BDD test project using C# Specflow. The application is browser based tested using Selenium WebDriver automation framework. There are a number of feature files with scenarios: ...
0
votes
1answer
122 views

Cucumber- Selenium Getting null pointer exception while openBrowser method

I am getting null pointer exception when selenium tries to launch the browser. I have already checked step Definition. Selenium OpenBrowser Method. Chrome browser version. ( I have driver 87.04 ...
0
votes
2answers
1k views

How to fix cucumber step does not have matching glue code?

The cucumber feature file has all steps highlighted in yellow and warning is shown as step does not have matching glue code, When I try to run the project as maven test, I am getting null pointer ...
0
votes
1answer
54 views

Cucumber + Junit + Extend Test Steps (use IDs in next step)

Details: We currently use Mockito/ Wiremock (in different teams), Junit and Cucumber in our test procedure. And test cases are functional, but we want to extend them with regard to post procedures. ...
0
votes
1answer
524 views

how to read the following data from excel using cucumber-java

Heading How to get the username and password from excel using cucumber package com.qa.excel; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import org.apache.poi.ss....
0
votes
1answer
211 views

I'm using ExtentSparkReporter for generating extent reports in cucumber with testng …how to add screenshot for failure scenarios

package cucumberhooks; import java.util.HashMap; import java.util.Map; import com.aventstack.extentreports.ExtentReports; import com.aventstack.extentreports.ExtentTest; import com.aventstack....
-1
votes
1answer
104 views

Cucumber with junit to automate java swing app

I need to automate java swing desktop application and want to run functional scenarios including click on buttons, opening of drop down lists etc using cucumber. Is there any junit package/class that ...
0
votes
2answers
37 views

Graphical front-end for jmeter

I use jmeter to test REST web services. For some customers, I'd like a graphical interface to show the flow of a script. I imagine tiles for each web service call and lines connecting those tiles to ...
2
votes
1answer
185 views

Hardening of test cases in test automation

Details: In a discussion about maintainability of automatic test cases in the area Cucumber + Junit / Unitest the topic "hardening of test cases" came up. You know this topic from your ...
1
vote
0answers
37 views

Is each Scenario in Cucumber BDD framework considered a separate .Java Class by JVM?

When I write Cucumber scenario's like:- User.java Feature File Scenario: Add a new user profile Given User is on the Add user profile page When user enters profile information and clicks ...
0
votes
0answers
34 views

How to execute test cases after ide crashed

Kindly suggest if I have 100 test cases after executing 40 Test Cases my IDE was crashed. So, on the next time when I am restarting my Test Cases again the execution should be start from 41 to 100. I ...
0
votes
0answers
13 views

Executing cucumber feature file in eclipse

I have installed cucumber plugin on eclipse 2019-09 but the console doesn't show anything after I run the feature file. I have created Maven project in eclipse and created one package for testrunner ...
1
vote
4answers
360 views

How to initialise the PageObject Class using PageFactory only ONCE in a Step Definition Class in a Selenium Webdriver + Cucumber project?

I am making a Regression suite Automation project using Selenium Webdriver, Java, Cucumber, Maven etc. Now, the problem is that I have multiple Page Object classes that I initialise again and again ...
0
votes
1answer
44 views

Is it considered an anti-pattern for me to group Cypress test steps this way?

Writing end2end tests with Cypress and cucumber, on a high level the test cases are as following: Feature: Users can change color scheme @focus Scenario: The user changes color scheme from Black ...
0
votes
1answer
268 views

How to get WebDriver Instance(Object) from Hooks(@Before) for parallel executions of scenarios

I want to get WebDriver Instance(Object) from the Hooks Class in @Before Annotation setup() method. And I want to do it in such a way that I am able to run my scenarios in parallel. I know what are ...
0
votes
1answer
144 views

Can Robot Framework framework iterate over example data?

The BDD sample below is written using Katalon Studio Scenario Outline: Verify Price of <plan> Plan Given <accountType> account is currently logged in When User navigates to Publish ...
0
votes
2answers
50 views

In Gherkin files, should I repeat the steps in the previous scenario if my following scenario depends on it?

I have read about the Cardinal Rule of BDD from various places when writing Gherkin files. In many of these examples, they have the following scenarios in a feature file: Feature: Google Searching ...
1
vote
1answer
97 views

Hooks not getting executed in protractor cucumber

I new to protractor, and trying to implement hooks. But the hooks are not getting executed. Following is my code: Hook.js: const { Before } = require('cucumber'); const {AfterAll} = require('...
0
votes
1answer
30 views

Getting undefined when I define {string} parameter in the when section in the step definition in protractor cucumber

I am new to protractor with cucumber. I have to automate a flow wherein on entering first name, last name, and postcode, a new user is created. I am trying to add the data to be entered in the feature ...
0
votes
0answers
25 views

How to add the number of times a test needs to be run in webdriverio and javascript

I would like to repeat a test run multiple times. So I would like to add the count to the command we are passing to run the test. I tried adding the option to grunt file but is not working Command ...
0
votes
0answers
407 views

How can i run my Cucumber project as a Maven Test as the Build passed but it shows Tests run: 0?

I have created a Cucumber project, which has multiple feature files, Step definition classes and one TestRunner.java class. Now, that project has a Maven project structure and i want to run it as a "...
1
vote
1answer
665 views

WARNING: Passing multiple tags through @CucumberOptions is deprecated. Please use a single tag expressions?

I tried to run a Cucumber test with multiple tags. But got this error. I am using Cucumber version 5.7.0. How can i run multiple tags now? import org.junit.runner.RunWith; import io.cucumber....
0
votes
0answers
160 views

How can we use the “TableTransfomer” Method to read data from “DataTable” in Cucumber?

I am stuck with using a TableTransfomer Class to convert Datatable into desired domain object. I am following some examples from the web, but have completely messed up my code. I just want Cucumber ...
3
votes
2answers
263 views

Is it good practice to skip the When clause in Gherkin/Cucumber/SpecFlow?

Is it a good practice to skip the When clause in Gherkin/Cucumber/SpecFlow? For instance: Scenario: user has to open a website Given User has access to website Then User should be able to validate ...
1
vote
1answer
591 views

How to implement Extent report in Cucumber using EventListener and Where to find documentation for this class

I was trying to implement a custom formatter using cucumber event listener but I was not able to get official documentation for this class. When I Googled i got the below link : https://www....
0
votes
1answer
45 views

Selenium, Cucumber. How to optimize the code for different objects and same actions?

I am very beginner with Selenium and I'd like to get an advice how to optimize the code. I have 3 tooltips on the website and want to do the same actions for all of them. I have written so far: ...
2
votes
1answer
55 views

Cucumber background feature

I'm trying to understand how to use the background feature in cucumber. My current understanding is that it's used as something that happens before every Scenario. But I don't really understand it. ...
6
votes
3answers
547 views

Is the Page Object Pattern the ideal approach for browser automation for a website which has a front-end that has frames in frames?

I'm confronted with a web application which has a front-end that has frames in frames in frames. Regarding automated UI Tests with Selenium and Cucumber, is the Page Object Pattern the right approach ...
1
vote
1answer
357 views

Guidelines on how to use Cucumber Java Scenario interface

I'm looking for information/guidelines on how to use io.cucumber.core.api.Scenario interface? I read through the API reference documentation and Official Cucumber-Java documentation and some scattered ...
0
votes
0answers
308 views

How can I set the file name of the cucumber reports using net.masterthought plugin?

I'm having issues setting up the file names from the masterthought plugin. https://github.com/damianszczepanik/cucumber-reporting TecStack from the project. java, junit, cucucumber, maven. For ...
3
votes
0answers
654 views

Cucumber - How to run background only once

Using Cucumber with Javascript and Selenium I have the following Gherking file: Feature: Login Background: Given database is filled with these emails and passwords. | tobias@...
1
vote
3answers
150 views

Cucumber feature file name is Jira ticket number

I am starting to name my cucumber .feature files as VerifyLogin_JIRA-1211.feature Is this the correct/optimum naming convention? This question might get closed due to "opinion-based" but there is ...
0
votes
0answers
25 views

read otp from seetest mobile application and paste to continue with login process in web application

I am using cucumber and configure appium and seetest to run web application on mobile browser, i want to check otp that is sent via my application to mobile number (on seetest device number which is i ...
3
votes
2answers
2k views

How to send API request json body in cucumber

Can anyone help me to send json request in one line ?? Example { "benefitPlanIDs": [ { "benefitPlanID": "011748abc", "benefitPlanPlatform": "abc" } ], "clientId": "abc", "...
2
votes
1answer
1k views

How to access step definition variables using hooks.js

Hi in the below protractor-cucumber step-definition, I can modify the step definition variable a from before hook: "use strict"; let { Given, Before } = require('cucumber'); ...