Comments (12)
@ejaoua you might want to take it to Slack to discuss these kind of things, or open a new issue/discussion at least.
Short answer: I don't think that's possible this way. You have to run testOnly SomeClass
where SomeClass
targets only some features file.
from cucumber-jvm-scala.
Hello @rhande-mdsol ,
Could it be that you have multiple scenarios with the same name (in the same file), or Scenario Outlines?
If so, this is is a known issue in sbt-junit interface:
sbt/junit-interface#84. See also #22
from cucumber-jvm-scala.
Might be worth adding a work around to detect if sbt-junit is used and act accordingly. The project seems dead.
from cucumber-jvm-scala.
Or ensure the names provided to the JUnit Description are always unique. That way sbt will also be able to handle identical features, scenarios, examples, ect. Shouldn't be too much of a burden if the #n
suffix only shows up when necessary.
from cucumber-jvm-scala.
Would either of you mind checking if cucumber/cucumber-jvm#2045 solves the problem.
from cucumber-jvm-scala.
Sorry Closed by mistake.
from cucumber-jvm-scala.
@mpkorstanje I am using
"io.cucumber" % "cucumber-core" % "5.7.0",
"io.cucumber" % "cucumber-junit" % "5.7.0"
"io.cucumber" %% "cucumber-scala" % "5.7.0"
So it is cucumber scala. Your code in cucumber/cucumber-jvm#2045
seems to be Java code. Can I use it ?
I will try publishing your code and let you know
from cucumber-jvm-scala.
@rhande-mdsol Cucumber Scala is using Cucumber JVM which is the foundation for various Cucumber libraries targeting the JVM.
In this case, it's the project cucumber-junit
that you could try to build on your own with the PR mentioned by @mpkorstanje and use in your project.
I will also try the PR on my side but probably later today.
@rhande-mdsol Do you confirm that your case is multiple scenarios with the same name in the same file, or using Scenario Outlines ?
from cucumber-jvm-scala.
@rhande-mdsol Cucumber Scala is using Cucumber JVM which is the foundation for various Cucumber libraries targeting the JVM.
In this case, it's the project
cucumber-junit
that you could try to build on your own with the PR mentioned by @mpkorstanje and use in your project.I will also try the PR on my side but probably later today.
@rhande-mdsol Do you confirm that your case is multiple scenarios with the same name in the same file, or using Scenario Outlines ?
Hi @gaeljw ,
Yes, this problem happens when I have a Scenario Outline:
and then have a table like structure in Examples:
section. For me 3rd example actually failed, but final result showed all tests passed.
Also this happens when you have a Step with parameterized value and reuse the step in the same Feature file at multiple places.
For example :
Scenario 1 =>
Scenario:
Given I know "Java"
Then I teach "Java"
Scenario 2 =>
Scenario:
Given I know "Scala"
Then I teach "Scala"
If Scenario 2 fails here, the final result still shows all have passed.
I also tried failing a scenario without an outline (i.e. Scenario:
) in this case final result shows failures properly.
Thanks
from cucumber-jvm-scala.
Thanks for confirming.
cucumber/cucumber-jvm#2045 should fix the issue then.
You just have to wait a bit for the next cucumber-junit
release (you'll have to update to 6.x but the upgrade from 5.x to 6.x is pretty easy).
from cucumber-jvm-scala.
Thanks for fixing the problem. Now final result shows failure when there is a failure in scenario outline.
from cucumber-jvm-scala.
Hi @rhande-mdsol ,
can you please share what was the plugin and/or correct syntax that you used to run one test of Cucumber :
sbt "testOnly <cucumber_class_name>".
I tried the following but it didn't work out sbt "testOnly *classpath:features/folder1/endpoint.feature
Thanks.
from cucumber-jvm-scala.
Related Issues (20)
- Cucumber 6.2.2 not listing all the failed scenarios at the end of tests run HOT 2
- Be ready for Scala 3 HOT 5
- Action Required: Fix Renovate Configuration
- State management for cucumber-scala + cucumber-piococcontainer HOT 6
- Migrate to GitHub Actions HOT 2
- Alternatives to JacksonDefaultDataTableEntryTransformer HOT 1
- Dependency Dashboard
- Internal documentation is not up-to-date since migration to sbt
- Provide a cucumber-scalatest integration HOT 3
- Automate releases HOT 3
- GPG updates HOT 4
- Use mdoc to provide safe documentation
- Compile with latest Scala 3 version HOT 1
- Fix cross build publication
- UndefinedDataTableTypeException with Boolean HOT 5
- Step containing regex capture group not found HOT 3
- Replace custom TypeTag like implementation with Typeable in Scala 3
- Provide a method on Datatable to map to list of custom type
- Provide a way to have Options in DataTableType
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cucumber-jvm-scala.