Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments in output #96

Open
Muffon opened this issue Jul 17, 2012 · 6 comments
Open

Comments in output #96

Muffon opened this issue Jul 17, 2012 · 6 comments
Labels

Comments

@Muffon
Copy link

Muffon commented Jul 17, 2012

Don't know if possible, but we would like to show comments in output documentation. How can we do that?

@x97mdr
Copy link
Owner

x97mdr commented Jul 17, 2012

Comments from where exactly?

You can already add more content to the descriptions of features and/or
scenarios if you like. You may use the Markdown syntax to make those
descriptions render better in HTML. Is this what you want?

On Tue, Jul 17, 2012 at 9:36 AM, Muffon <
[email protected]

wrote:

Don't know if possible, but we would like to show comments in output
documentation. How can we do that?


Reply to this email directly or view it on GitHub:
#96

@Muffon
Copy link
Author

Muffon commented Jul 18, 2012

For example a line with leading "#" is not in output documentation.

Scenario: Preconditions for sending changeset to Central File
When changeset L120001 is about to be sent to CF
Then the system checks changeset has status DRAFT
And the system checks I'm author of the changeset
And the system checks ServiceBase reference is valid
#TCN% nebo PCN%
And the system checks changeset is validated
#validuji jeste pred tim, nez prejde na CF, aby technolog mohl provest potrebne opravy, pote uz se hodnoty nemeni
#protoze nemam podminky na status vyrobku, tak muzu poslat i DESIGN vyrobky pres CF (=zamknuti vyrobku, pro L.M.)

@x97mdr
Copy link
Owner

x97mdr commented Jul 18, 2012

It is possible but I'm not sure of the Use Case for this. Everyone uses
comments in a different way so for some people it could lead to very messy
output. It looks like you are using it to add context to particular steps
which is a no-no. If you wanted to add context to the description you
could simply add text to the scenario like so:

Scenario: Preconditions for sending changeset to Central File
TCN% nebo PCN%
validuji jeste pred tim, nez prejde na CF, aby technolog mohl
provest potrebne opravy, pote uz se hodnoty nemeni
protoze nemam podminky na status vyrobku, tak muzu poslat i DESIGN
vyrobky pres CF (=zamknuti vyrobku, pro L.M.)

    When changeset L120001 is about to be sent to CF
    Then the system checks changeset has status DRAFT
    And the system checks I'm author of the changeset
    And the system checks ServiceBase reference is valid
    And the system checks changeset is validated

The above is perfectly legal gherkin/SpecFlow syntax. Is that a viable
alternative?

On Wed, Jul 18, 2012 at 2:27 AM, Muffon <
[email protected]

wrote:

For example a line with leading "#" is not in output documentation.

Scenario: Preconditions for sending changeset to Central File

    Then the system checks changeset has status DRAFT
    And the system checks I'm author of the changeset
    And the system checks ServiceBase reference is valid
    #TCN% nebo PCN%
    And the system checks changeset is validated
    #validuji jeste pred tim, nez prejde na CF, aby technolog mohl

provest potrebne opravy, pote uz se hodnoty nemeni
#protoze nemam podminky na status vyrobku, tak muzu poslat i
DESIGN vyrobky pres CF (=zamknuti vyrobku, pro L.M.)


Reply to this email directly or view it on GitHub:
#96 (comment)

@Muffon
Copy link
Author

Muffon commented Jul 18, 2012

Thanks x97mdr!
Your way works. But the best way, i think, is just to grey or differ the line where is "#" symbol. Then anyone can comment every "Given, Then, And..." sentence.

@x97mdr
Copy link
Owner

x97mdr commented Jul 18, 2012

I still don't like the idea :)

Commenting on individual steps is an anti-pattern. It means either the
step isn't descriptive enough or the scenario doesn't have enough context.
To me, the comments on steps are a band-aid over the root problem.

Sorry :)

On Wed, Jul 18, 2012 at 6:32 AM, Muffon <
[email protected]

wrote:

Thanks x97mdr!
Your way is working. But the best way, i think, is just to grey or differ
the line where is "#" symbol. Then anyone can comment every "Given, Then,
And..." senetence.


Reply to this email directly or view it on GitHub:
#96 (comment)

@Muffon
Copy link
Author

Muffon commented Jul 18, 2012

We understand your opinion.
But Gherkin does not explicitly permit comments inside scenario.
Customer reads the scenario and understands it better when the comment is closer to the definition.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants