Comments (6)
Okay, this probably won't work yet. Another complication in the logic for the scenarioReporter :) Thanks for reporting this!
Just out of curiosity: what's your use-case for combining given stories and examples tables?
from jbehave-junit-runner.
Hi Andreas,
Thank you for working on such a great tool. I went ahead and cleaned up my flow, there was no need to have examples tables in the GivenStories only on the story using the GivenStories. Here how to reproduce now:
- Have a story that uses GivenStories that is parameterized with an example table
- Have the GivenStory also parameterized with the values coming from the example table from the parent story
This flow works just fine with jBehave-Web but it throws the exception above when using JUnitReportingRunner. My use case is the following:
- I'm testing a webApp
- I'm testing a feature of the webApp for example generateReports functionality. I can select different type of reports (this is where I use the parent's parameterization)
- To do anything in the webApp the user needs to login first. Here is where I call GivenStories: baseLogin.story
- We have different types of users in the webApp (admin, regular, etc). This is where I need GivenStory parameterization, to provide the user type in the parent story
from jbehave-junit-runner.
Intriguing. Could you post the relevant sections of your story files? I haven't used parameterized GivenStories yet, would like to see what you have done. Also, it would give is a test case :)
from jbehave-junit-runner.
At the same time I noticed, that the test suite AfterStories is not green anymore. Somewhere the test case counting went haywire. Opening new bug for that.
from jbehave-junit-runner.
@daniel, take a look at "given_stories_parametrised_by_examples.story" on the jbehave-trader-example (jbehave-core/examples/trader). This story has the structure I'm taking about. There are other good GivenStories examples there as well. Let me know if you still want me to post my stories
@andreas,
The fix works and my stories run. Thanks a lot! :-)
If I want to be picky I do have the following to report:
- Multi level GivenStories don't show on the JUnit window. Only the first GivenStory shows but if this GivenStory has a GivenStory that one doesn't show
- The steps of the GivenStory don't show. There is only 1 line with the story name and it doesn't have a check mark even though it ran successfully.
I would consider these "enhancements" since the feature now works. This might be related Issue #16 you opened. Let me know if you want me to add that detail there or open a new issue
from jbehave-junit-runner.
Hi,
glad that this is fixed for you :)
About your pickiness. You are absolutely right. I knew about the second point, but haven't even thought about nesting Given Stories :) The technical background is, that while we're building the test execution tree for JUnit prior to executing it, we only get the given story as a path, so we would have to somehow parse it. I don't know yet how to do that with JBehave. Maybe it's not that difficult. So please, if you don't mind, create two enhancements.
Thanks and enjoy your weekend. Hope you have such a great weather as we in Germany do.
Andreas
from jbehave-junit-runner.
Related Issues (20)
- Move to JUnit 5
- Suggestion on using this with WeldAnnotatedEmbedderRunner
- Handle RestartingScenarioFailure HOT 1
- Filtering out all scenarios in the story file causes NPE HOT 9
- How to make Junit runner read limited words from scenario and create .xml file from it. HOT 4
- I cannot start single scenario in eclipse HOT 5
- NPE on Failure.getTestHeader(Failure.java:44) when step throws assert in Lifecycle>After>FAILURE
- Using JUnitReportingRunner with pitest HOT 2
- Export the report in any other format
- Tests failing on master HOT 2
- How to generate the jbehave-surefire.xml file with parametrised examples HOT 5
- Inconsistent versions HOT 10
- Throws RuntimeException on scenario failure instead of java.lang.AssertionError HOT 2
- jbehave-junit-runner by maven and not from IDE HOT 7
- Jbehave-junit-runner incorrectly shows scenarios being executed when mata keywords applied in Jbehave 4 version HOT 13
- bad checksum on repo1.maven.org HOT 1
- Not showing correct test names in IntelliJ HOT 7
- Customize output monitor HOT 1
- Comments in scenario are reported as ignored HOT 10
- Remove fix for special IntelliJ handling
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 jbehave-junit-runner.