shivi malviya
2013-11-22 12:04:47 UTC
Hi,
We have developed a test framework using Cucumber. We are facing problem
when we have common scenarios in multiple feature files and each feature
file has a separate step definition files.
Please find below the detailed scenario :
Feature File1 :
Scenario Outline: 02 Chosen newsroom stored in cookie
Given user visiting the newsroom page
When <region> newsroom is selected
Then selection shall be stored in cookie <cookieValue>
Feature File2 :
Scenario Outline: 03 Filters on newsitem listing in newsroom
Given user visiting the newsroom page
When a <tagfilter> is selected
Then only news items marked with this <tagfilter> filter should be
displayed
When user clicks link "View Older News"
Then more 25 news items are appended to news list
So the lines highlighted in Yellow are common lines used in both feature
files, now we are creating one step definition file for each feature file.
Now when i am declaring step definition for highlighted step in both step
definition file, it is giving me duplicate step definition error, and when
I am keeping it only in one step definition file, it is giving me Null
Pointer exception.
Another thing which I tried is to extend step definition file , but then I
got error it is not possible to extend the step definition files.
How should i reuse my step definitions in other step definition file when
we some some common scenario lines in multiple feature files ?
Please suggest.
Thanks,
Shivi
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org To unsubscribe from this group, send email to cukes+***@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
We have developed a test framework using Cucumber. We are facing problem
when we have common scenarios in multiple feature files and each feature
file has a separate step definition files.
Please find below the detailed scenario :
Feature File1 :
Scenario Outline: 02 Chosen newsroom stored in cookie
Given user visiting the newsroom page
When <region> newsroom is selected
Then selection shall be stored in cookie <cookieValue>
Feature File2 :
Scenario Outline: 03 Filters on newsitem listing in newsroom
Given user visiting the newsroom page
When a <tagfilter> is selected
Then only news items marked with this <tagfilter> filter should be
displayed
When user clicks link "View Older News"
Then more 25 news items are appended to news list
So the lines highlighted in Yellow are common lines used in both feature
files, now we are creating one step definition file for each feature file.
Now when i am declaring step definition for highlighted step in both step
definition file, it is giving me duplicate step definition error, and when
I am keeping it only in one step definition file, it is giving me Null
Pointer exception.
Another thing which I tried is to extend step definition file , but then I
got error it is not possible to extend the step definition files.
How should i reuse my step definitions in other step definition file when
we some some common scenario lines in multiple feature files ?
Please suggest.
Thanks,
Shivi
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org To unsubscribe from this group, send email to cukes+***@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.