You can request new features on JIRA: http://jbehave.org/issue-tracking.html

That said, your features require substantial changes and are more likely to be considered for the 4.x releases.

On 10/02/2013 15:13, Handa, Ramneek wrote:

I would love to have ability to write a sub scenario which is a part of many scenarios so as to avoid repetition.

@Before/@AfterScenario/... -- as a coder of my tool I wouldn't know what the story writer would like to do at teardown and setup.

Unfortunately these two are very basic needs for me to use JBehave. Is it not done because its complex given how JBehave is implemented or has it never been the priority?

I can write my requirement and file an issue if you think this can be supported soon?

Regards

*From:*Mauro Talevi [mailto:[email protected]]
*Sent:* Sunday, February 10, 2013 10:39 PM
*To:* [email protected]
*Subject:* Re: [jbehave-user] User defined keyword

You can define "composite steps" from other defined steps: http://jbehave.org/reference/stable/composite-steps.html

User-defined keywords are not supported, the only keywords allowed in the scenario steps are "Given/When/Then/And" but the rest of the step language is entire up to you to define. You can also change the existing ones, ie use different values for them, via i18n support. The idea being that Given/When/Then represent generic step types (precondition/event/result) and you should be able to fit comfortably into these types by appropriate use of the step language that follows.

There is no setup/teardown in the story syntax, i.e. something executed before and after *each* scenario or story. There is however :

- GivenStories ... i.e. one or more stories executed on demand (i.e. on explicit invocation) before scenarios or stories. - @Before/@AfterScenario/Story/Stories ... i.e. annotated steps in code that are executed before each scenario/story/group of stories


On 10/02/2013 13:59, Handa, Ramneek wrote:

    Hi Guys,

    Is it possible for the story writer to create new higher level
    steps (which consists of multiple steps)? I am moving from robot
    framework and it has this feature of user defined keywords that i
    couldn't find in jbehave website. Could someone please point me in
    the right direction?

    Also, i would like to know if there is a way for story writer to
    write setup/teardown in gherkin?

    Regards,

    Ramneek


    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.


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