On 30 Sep 2015 11:35, "Rafaela Souza" <rafaela.az...@gmail.com> wrote:
>
> I am trying to do the same, the Scenario is working for me, but the feature name it is impossible to get. I couldn't find anything at all.
You have replied to at least a thread that where it is mentioned that to get the feature name you need a custom formatter and not a hook.
In hooks that information is not available as it's an antipattern. If you need it good chances are that you are misusing hooks for something they were not designed for.
What is your use case?
> On Tuesday, June 16, 2015 at 7:49:10 AM UTC+1, satish gowda wrote:
>>
>> I am trying extract the feature and scenario at run time
>>
>>
>> import gherkin.formatter.model.Scenario;
>> import cucumber.api.java.Before;
>>
>> @Before
>> public void before(Scenario s) {
>> System.out.println("currently executig scenario " + s.getName());
>> }
>>
>> getting error "cucumber.runtime.CucumberException: When a hook declares an argument it must be of type cucumber.api.Scenario. "
>> could some one tell how to extract the feature and scenario at run time
>
> --
> Posting rules: http://cukes.info/posting-rules.html
> ---
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.