You can try the latest 3.9-beta-2, which should be synched to Central
during the day.
On 11/09/2013 14:20, Pablo Guijarro Enríquez wrote:
Hi Mauro,
Ok, that makes sense, now it is clearer. I even made the test of
putting "Meta: @tags" at the end of the scenario title and it worked
for the same reason: the Gherkin parser ignored it and jBehave
interpreted it and skipped the scenario.
Anyway, I think I will wait for next version in order to properly use
filters based on Meta tags.
Many thanks!
Pablo
*De:*Mauro Talevi [mailto:[email protected]]
*Enviado el:* miércoles, 11 de septiembre de 2013 15:00
*Para:* [email protected]
*Asunto:* Re: [jbehave-user] Meta filtering support of the Gherkin
story parser
Hi Pablo,
the Gherkin story parser uses the Gherkin parser to trasform the input
text into the JBehave syntax. As such, some element may
coincidentally work simply because they are ignored by the Gherkin
parser. This is the case for the first tag, which in fact is
interpreted as part of the free-text description by Gherkin and as
meta by JBehave.
As part of the new enhancement, the Gherkin tags are properly handled
and converted to JBehave meta.
Cheers
On 11/09/2013 12:19, Pablo Guijarro Enríquez wrote:
Hi Mauro,
Thanks for your feedback. However, I have tried to filter either
the whole feature or just one scenario by putting just the tag
before the elements and that did not work, the whole set of
scenarios was executed (the filter was configured in the embedder
as explained in my previous mail). I understood from your mail
that it would work this way.
@skip
Feature: Some feature
Some description
@skip
Scenario Outline: Scenario 1
Given some prerequisites
When something happens
Then some result is obtained
Examples:
Table with data used in steps
Scenario Outline: Scenario 2
...
Currently the only way I am able to apply a filter is as shown in
the first sample feature of my previous mail (which is weird,
provided that Meta: is not supported according to your explanation).
Regards,
Pablo
*De:*Mauro Talevi [mailto:[email protected]]
*Enviado el:* miércoles, 11 de septiembre de 2013 12:21
*Para:* [email protected] <mailto:[email protected]>
*Asunto:* Re: [jbehave-user] Meta filtering support of the Gherkin
story parser
Hi,
Meta: is not a recognised keyword by Gherkin parser.
You simply put the tag before the element, e.g.
@skip
Feature: Some feature
That said, the tag support is a new feature in 3.9 and will soon
be released:
https://jira.codehaus.org/browse/JBEHAVE-940
If you want you can tried out the latest 3.9-SNAPSHOT.
Cheers
On 11/09/2013 11:06, Pablo Guijarro Enríquez wrote:
Hello,
I am using the jBehave maven plugin (v3.8) with the jBehave
gherkin module (v3.8) and after some investigation I have been
able to filter features (stories) using meta filters, but I
have not been able to filter just specific scenarios, so I
wonder whether that is supported or not using the Gherkin
story parser.
For example, I am able to skip the execution of a whole
gherkin Feature (story) by adding the filter to the
corresponding embedder
(embedder.useMetaFilters(Arrays.asList("-skip"));) and adding
the Meta info right after the description:
Feature: Some feature
Some description
Meta: @skip
Scenario Outline: Scenario 1
Given some prerequisites
When something happens
Then some result is obtained
Examples:
Table with data used in steps
Scenario Outline: Scenario 2
...
But I am not able to filter just the execution of Scenario 1.
If I set the Meta information right after the Scenario Outline
title, as explained in the Meta-Info documentation, the
scenario is executed anyway:
Feature: Some feature
Some description
Scenario Outline: Scenario 1
Meta: @skip
Given some prerequisites
When something happens
Then some result is obtained
Examples:
Table with data used in steps
Scenario Outline: Scenario 2
...
Is there anything I am missing?
Many thanks,
Pablo