Questions tagged [cucumber-spring]
19 questions
4
votes
1 answer
Cucumber in Spring Boot main scope : Autowire not working
Working off of this post: Cucumber: no backend found when running from Spring Boot jar
I am attempting to get Cucumber to work full within a live Spring Boot app. I currently have a POC app using the aforementioned post's code to create a Cucumber…

Joe Kennedy
- 91
- 6
4
votes
0 answers
How to consume cucumber step class from imported library?
I made a java lib project with all steps classes to be used in other project
package ulala.aop.integration.steps;
public class KafkaSteps {
@Autowired
private BinderAwareChannelResolver resolver;
@Autowired
private MessageChannel localOutput,…

TuGordoBello
- 4,350
- 9
- 52
- 78
3
votes
1 answer
What are the differences between `cucumber-glue` scope and step member variables?
AFAICT, there's not much difference between using cucumber-glue scope and instantiating member variables in step classes other than where the instantiation code resides.
For example, using cucumber-glue scope:
@Configuration
public class…

Noel Yap
- 18,822
- 21
- 92
- 144
2
votes
1 answer
How to run parallel Cucumber Spring Boot integration tests with Maven (surefire or failsafe)?
Hello folks,
I'm developing cucumber tests since january of this year and i'm now facing a problem running cucumber integration tests in parallel with maven (surefire as well as failsafe) in a Spring Boot environment.
In a nutshell:
I want to run…

maximotus
- 21
- 1
- 5
1
vote
1 answer
Any one able to run parallel tests: Using Cucumber 6.10.2 or newer versions, cucumber-Spring, Junit 4.13.2 and Mavensurefire 3.0.0.M3 and above
Using below combination of versions, the parallel execution through surefire is not working properly. If we change Cucumber to 4.8.1, then the parallel execution through surefire works.
**Cucumber 6.10.2 or newer versions, cucumber-Spring, Junit…

Susnigdha Chatterjee
- 13
- 4
1
vote
1 answer
CucumberBackendException: No test instance
I have a Spring Boot 2.7.1 (but same happens with 2.6.4) project using Cucumber BOM 7.4.1.
testImplementation(platform("io.cucumber:cucumber-bom:7.4.1"))
testImplementation group: 'io.cucumber', name: 'cucumber-java8'
testImplementation…

Vincent F
- 6,523
- 7
- 37
- 79
1
vote
0 answers
How to use Autowired in BeforeStep cucumber step definition
I'm getting NullPointerException when I use @Autowired in the @BeforeStep cucumber method in my step definition. What I'm doing wrong here?
Please find my code below:
RunTest.java
import io.cucumber.junit.platform.engine.Cucumber;
@Cucumber
public…

Mike Marsh
- 387
- 3
- 15
1
vote
1 answer
Merging properties files using cucumber-spring
We are using cucumber + selenium to facilitate e2e tests. We are using following dependencies to leverage on spring dependency injection.
io.cucumber
cucumber-spring
…

julew
- 216
- 3
- 14
1
vote
0 answers
Spring Autowiring is not working with Cucumber
I am trying to write Functional test cases using Cucumber. Everything works fine until I try to Autowired any of the Spring Component and use it inside anywhere in Cucumber Test classes.
I am using the below configuration in maven…

Muthu
- 43
- 1
- 2
- 10
0
votes
1 answer
Cucumber Steps Marked As Unimplemented When Running From Multiple Step Files
I have the following configuration for my tests:
Under the resources -> features folder file I have the users and moment feature files:
Users.feature
Feature: Validate the user related endpoints
Background: Set up user
Given I add a user to…

Francislainy Campos
- 3,462
- 4
- 33
- 81
0
votes
0 answers
No more allure-results for cucumber after adding spring-boot framework
No more allure-results for cucumber after adding spring-boot framework
Our test-framework version-1 (TF.v1) uses cucumber 7.11.2.
Launching tests with maven-surefire-plugin:3.0.0-M7. Among other things, surefire creates target/allure-results. After…

Christoph Meier
- 31
- 3
0
votes
0 answers
Can i map the step defination by tag. If steps are repeated in diffrent feature file and in Java files?
Is there any way by which I can map the specific step while executing the different feature file. Output of these steps will be input to other steps and there implementation will be differ
Feature: LO Register Loan
@LOLoanCreation
Scenario…

Thilakraj
- 63
- 1
- 10
0
votes
1 answer
BeanInstantiationException: Failed to instantiate Factory method '####' threw exception with message: Input must be set
I am running selenium cucumber tests with spring configuration.
I have created beans for all pages and autowired them in all steps classes.
i created a cucumberspringconfig file as well
When running as maven test run i get the below error
by:…

Satish
- 11
- 4
0
votes
1 answer
Add cucumber tags and feature file programmatically
I am using spring-boot cucumber with TestNG to write and API test framework ,
wanted to undersatand how can add tags and feature file to executed based on environment selected
Below is my current implementation
@CucumberOptions(
features =…

Harshit Soni
- 37
- 4
0
votes
2 answers
how to control the number of threads for execution in cucumber testNG parallel
I'm trying to run 2 Cucumber tests in parallel and sequential using TestNG and SpringBootTest but when my tests execute the following happens
mvn test
2 browsers open and both navigate to the Wikipedia homepage.
if you add 2 more scenarios it opens…

automatenew_jog
- 1
- 2