how to comment a story line in JBehave Story

Vijay picture Vijay · Jan 4, 2013 · Viewed 22.3k times · Source

I have a story line as follows

Scenario: 

Given user is on Login page

When user types login details with xxx as user xxx as passwd and submits

Then dashboard is shown

please advise, how to comment or not to make run for a line(example: 2 line should not undergo for test after 1 directly 3 line)

Answer

dertseha picture dertseha · Jan 23, 2013

You want to temporarily disable a step in your scenario? Comment the line using the prefix "!-- ", such as

Given user is on Login page
!-- When user types login details with xxx as user xxx as passwd and submits
Then dashboard is shown

The space right after the !-- is mandatory. Thanks @flaz14

See documentation on JBehave: http://jbehave.org/reference/stable/grammar.html