While working with JBehave, I found there was really no granular test structure. You put a story or set of stories in a singular test case, which means all scenarios and steps are effectively part of the same test. Running JBehave tests with JUnit basically requires packaging up the dependencies for a particular story or set of stories into your test case and executing them all as a single test method. If you look at this particular arquillian-testrunner-jbehave project you'll see it repeats this structure for Arquilllian tests.
My question is, given the very different structure of Cucumber-JVM tests and Arquillian tests, does it make sense to package up the dependencies of a single feature into a dedicated test fixture? Basically, I would create a basis for packaging a feature as an Arquillian test and running it similarly to the main method of the cucumber.cli.Main class.
Any thoughts or pointers are greatly appreciated.
Any thoughts or pointers are greatly appreciated.
Any thoughts or pointers are greatly appreciated.
Don't know Arquillian well enough to give you more than that.... hope it helps.
On Thursday, July 5, 2012 7:05:14 PM UTC-5, Rex Hoffman wrote:Ran in to the same problem when working on testNG integration. Cucumber jvm is an object based testing tool, and reports are based on objects as well... TestNG internals are heavily coupled to the class based model for testing and reporting. It's reporting is particularly problematic.I've pretty much dumped testNG as a result. Used TestNG for years due to feature set and extended it a bit... but once I saw the inherent coupling of the system, I realized the damage it does to the way we write tests to think of them -- as class based rather than object based. TestNG's reporting is starting to fall apart as a result if you use some of there extended features.... ObjectFactory in particular....Check out:To understand why junit integration was sensible and (simple/easy).That said we need a way to run/report on scenarios as a thread-safe unit, which I'm starting on now (after doing some catch up with the community).Hope this helps.Rex
On Tuesday, July 3, 2012 1:55:34 PM UTC-7, Logan McGrath wrote:I'm working on integrating Cucumber-JVM with the Arquillian test framework and I've found a couple significant differences:
- Arquillian requires each test executed to be in the structure of test class > test instance > test method. The API and SPI depend on this structure.
- Cucumber-JVM organizes tests roughly by feature > scenario > step and reflects this with its JUnit integration.
While working with JBehave, I found there was really no granular test structure. You put a story or set of stories in a singular test case, which means all scenarios and steps are effectively part of the same test. Running JBehave tests with JUnit basically requires packaging up the dependencies for a particular story or set of stories into your test case and executing them all as a single test method. If you look at this particular arquillian-testrunner-jbehave project you'll see it repeats this structure for Arquilllian tests.
My question is, given the very different structure of Cucumber-JVM tests and Arquillian tests, does it make sense to package up the dependencies of a single feature into a dedicated test fixture? Basically, I would create a basis for packaging a feature as an Arquillian test and running it similarly to the main method of the cucumber.cli.Main class.
Almost all my work is based around the Main class right now (including maven test executions). Decomposing cucumber-jvm in to it's constituent parts to do interesting things (tm) is pretty difficult right now, especially multithreaded stuff.
Is that interesting things (tm) as in "trademark"? lulz
Any thoughts or pointers are greatly appreciated.
Don't know Arquillian well enough to give you more than that.... hope it helps.Arquillian is very much stuck in the class-based model... The reading does help a lot though in understanding the reasons for JUnit's architecture and why it's a perfect fit for Cucumber-JVM. I'm thinking I'll wrap or reimplement the Cucumber test runner and stick that in a super class. It's an ugly solution, especially considering JUnit's intended design, but it'll work.