Questions tagged [cucumber-junit]

The JUnit integration provided by the Cucumber-Jvm project.

Cucumber-Jvm is the pure java rewrite of Cuke4Duke which just a port of Cucumber from Ruby to JRuby. Cucumber-JUnit provides integration with JUnit so that Gherkin tests can be run alongside other JUnit tests.

562 questions
2
votes
0 answers

org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process Test mechanism null

When i am executing the tests through git bash i am getting build failure even after all tests are passing with the following error: Git bash command - mvn clean install -B -Pdev -Dcucumber.options=-m -Dtest=EndToEndTestSuite Failed to execute goal…
2
votes
1 answer

Is there a way to post Karate Cucumber Report to Slack without breaking formatting?

To be clear, I have been able to post to Slack using the incoming webhook and sending a file link. However, I run into an issue where overview-features.html does not load with any of the supporting .css or .js Below is what happens when I load my…
athao25
  • 25
  • 3
2
votes
1 answer

How to get handle of Karate Results when running features and scenarios in SEQUENTIAL mode NOT Parallel in Karate

I'm basically attempting to run my scenarios in sequence and trying to find if there is a way to get the handle to Results in @AfterClass method. I know that it is possible when running in parallel, but our necessity is to get a break down of all…
2
votes
1 answer

How to set sauce-labs job result as pass or fail using karate?

I'm trying to run a simple test scenario on sauce-labs, but the issue is that sauce-labs doesn't identify the test-status as passed or failed on its own. I've gone through multiple solutions but couldn't make any of them work. I would love to know…
2
votes
0 answers

How to attach the screenshot to each step in ExtentReport?

I'm trying to use ExtentReport with Cucumber v4. I'm able to generate the execution report at the end of the test case, including the proper step list (for all steps that were executed) with their screenshots. However, although the screenshots are…
2
votes
2 answers

Can we use soft assert in Junit as like TestNG...?

Can we use soft assert in Junit as like TestNG: I dont want to fail my Test Case if Assert Condition fail Any way to solve this use case
Kiran Yadav
  • 46
  • 1
  • 5
2
votes
1 answer

gherkins, Can 2 scenarios be dependent on each other

Scenario1 When a new user clicks on sign up page And provides login ID Then user is signed up and can view profile page. Scenario2 When user clicks on the edit profile page And updates his address Then updated profile should be visible to…
javaGroup456
  • 313
  • 1
  • 6
  • 21
2
votes
2 answers

cucumber - "Test ignored" error while running Runner in IntelliJ

I am trying to run a simple example of cucumber-Junit in Intellij, but not geting error "Test ignored". (I have installed cucumber for Java plugin) My feature file, Runner class, Stepdefinition class and java class look as below: I also tried…
user523956
  • 501
  • 2
  • 9
  • 23
2
votes
1 answer

Unable to link StepDef with features when using the new io.cucumber package after 4.7.1 Cucumber update

I've been trying to link my feature files with my stepdefinition files. I have everything linked properly. The thing is Cucumber has been refactored after 4.3.0 and now when I try to use the "Create Step Definition" option in Intellij I end up using…
2
votes
1 answer

How can we run only specific cukes with Cucumber

I do understand that cucumber itself not providing any such functionality where we can run specific few cukes from cucumber. Note: from cukes I meant multiple folder having different feature files For Example: Folder1: -> one.feature ->…
2
votes
3 answers
2
votes
1 answer

Implement Cucumber "cucumber.api.java8.En" interface by step definition class

What is the purpose of implementing "cucumber.api.java8.En" interface by cucumber step definition classes?.
Vinee-the-Pooh
  • 835
  • 3
  • 10
  • 27
2
votes
1 answer

Cucumber @Before hook runs twice @After once

to all. Curently writing a little BDD Test automation framework, using Java11+Junit5+Cucumber+Selenium, build tool: Graddle. Created a little test for validating Google title. When starting test, using Test task in Graddle or running CucumberRunner…
2
votes
2 answers

Getting org.junit.runner.RunWith is not an annotation type with Cucumber

I'm trying to set-up a Selenium + Cucumber project in Java (I'm a beginner with Java) in Intellij. This is my class that uses the Cucumber JUnit runner: package runtest; import cucumber.api.CucumberOptions; import…
Mate Mrše
  • 7,997
  • 10
  • 40
  • 77
2
votes
1 answer

Cucumber failed to instantiate class, steps undefined

I keep getting these errors every time I try to run my test using cucumber with selenium: cucumber.runtime.CucumberException: Failed to instantiate class br.gov.pb.receita.atfbdd.steps.arrecadacao.ConsultarLancamentoARR001 - this class doesn't have…