Hi,

yes, what you're describing is a typical use case of JBehave, having the stakeholders (technical or not) write the stories and having the technical folks code the steps.

The fact that you write the steps in Java or in Ruby/Groovy/Scala is a detail, because what matters is that they be compilable to bytecode, i.e. readable from the Java runtime, and that they support Java annotations. All the rest of the JBehave functionality remains the same, including the execution and generation of the reports.

JRuby allows this via its java_annotation and java_signature extensions of Ruby. Using the jruby-maven-plugin the JRuby sources are compiled to Java.

Have a look at the JRuby example, it should be pretty self-explanatory:

https://github.com/jbehave/jbehave-core/tree/master/examples/jruby

Don't hesitate to ask if you have further questions.

On 10/02/2013 12:36, Handa, Ramneek wrote:

Hi Folks,

I am migrating from robot framework. I am looking for a particular feature and would like to know if it is possible.

I am trying to create a product for our technical and non technical staff to write their expectations in (i.e. the use cases etc).

While it is primarily geared towards non technical staff, there are going to be some cases when technical people will be writing their cases and may require to extend and/or introduce new steps.

So the product will contain some standard step definitions and if someone wants to do more they can write their own step and bundle it with the test cases. Finally they can run the product and give input of their steps file (ruby code) and test case file (story) and the product will execute the story and generate the standard jbehave style report.

Can you tell me if this is possible?

I say the following in jruby/scala/groovy sections and got confused? Is it because the annotations are compiletime? (sorry haven't yet looked at jbehave code).

The Scala classes must be compiled directly into Java bytecode.


This email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please delete all copies and notify the sender immediately. You may wish to refer to the incorporation details of Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at http://www.standardchartered.com/en/incorporation-details.html.

Reply via email to