Issue Type: Story Story
Assignee: Unassigned
Created: 24/May/12 10:42 AM
Description:

I would like know to know in Jbehave framework that, how we could map the Scenario(from Story file) to data in data file(External file) in Jbehave.

Generally, each Scenarios will have some set of parameter in story file and mapping data will be available in data file as mentioned below.

Scenario: Login1: User Logs into the Application
Given I log into Application as user <username>
with password <password>

Examples:
../Login.table

Login.table
-----------

username password
ABC xxx

Scenario: Login2: User Logs into the Application with incorrect password

Given I log into Application as valid user <username> with invalid password <password>

Examples:
../Login1.table

Login1.table
------------

username password
ABC invalidpassword

The above one looks like one to one mapping, means each scenario should have separate data file.

I would like to keep all the data's in one data file itself by having scenario mapping in story file and data file.

Below one illustrates the scenario mapping in story file and table file
It can be easy to maintain the data's in data file without affecting the actual story file, if i get the solution for this.

Login.story
-----------

Scenario: Login1: User Logs into the Application

Given I log into Application as user <username>
with password <password>

Examples:
/Login.table

Scenario: Login2: User Logs into the Application with incorrect password

Given I log into Application as valid user <username> with invalid password <password>

Examples:
/Login.table

Login.table
-----------

Scenario: +Login1

username password
ABC xxx

Scenario: +Login2

username password
ABC invalidpassword
Project: JBehave
Priority: Major Major
Reporter: jbehaveuser
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to