cucumber / cucumber-jvm

Cucumber for the JVM
https://cucumber.io
MIT License
2.7k stars 2.02k forks source link

Cucumber scenario reusing of the Example data for multiple scenarios #509

Closed jawsu02 closed 11 years ago

jawsu02 commented 11 years ago

I have a requirement where I would needed to share multiple scenario outlines have to use same example data. I wonder do we have any way of doing it in Cucumber ? Please find the below example

I tried to do the same in Cucumber JVM but got Lexing error

I have found an example which was using JBehave

Feature file

Scenario: Login should be secure against SQL injection bypass attacks in the password field Given the login page And the default username from: users.table When the password is changed to values from And the user logs in Then the user is not logged in

Examples: tables/sqlinjection.strings.table

Scenario: Login should be secure against SQL injection bypass attacks in the username field Given the login page And the default username from: users.table When an SQL injection is appended to the username And the user logs in Then the user is not logged in

Examples: tables/sqlinjection.strings.table

sqlinjection.strings.table

|value | |'-- | |' OR '1'='1|

Does any one know how to acheive this in Cucumber?

aslakhellesoy commented 11 years ago

Please don't ask questions here, only report issues. See CONTRIBUTING.md

jawsu02 commented 11 years ago

sorry for that, thanks........

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.