Please reply in line and prefix the subject with [JVM] next time, as
stated at the end of each email or on the group homepage.
On Tue, Nov 19, 2013 at 11:08 AM, King Arsan <
rajku...@gmail.com> wrote:
> Hi Richard,
>
> Thanks for your reply. That looks good for running the test for single
> domain. Apologies for not having clear example.
>
> My current feature file looks like this
>
> --------------------------------------------------------------
>
> Scenario Outline : Verify Login journey
>
> Given I am in <Domain> login page
> When I enter my email
te...@gmail.com to login
> Then I can see the home page
>
> Examples:
>
> | Domain |
> | UK |
> | US |
> | AUS |
>
> I don't want to hard code the domain values in the feature file. If I need
> to run the test for UK domain, then it's very tough.
Scenario outlines are meant to run scenarios in slightly different
situations, not to parametrize them. I believe Richard's solution is
the best way of testing all three domains (or even only one). The only
thing I would change is to use a single system property to load all
the others from a property file (e.g. passing DOMAIN=US would load the
us.properties file, etc.). On top of it, you can write two sets of
scenarios:
1) Scenarios that express common functionalities on every domain (not annotated)
2) Specific features to a domain (annotated with @us, @uk and/or @aus)
A couple of sample scenarios follow.
Scenario: Successful login journey
Given I am not logged in
When I go to the login page
And I enter my credentials correctly
Then I can see the home page
@uk
Scenario Outline: Queen's birthday login advert
Given it's <time> the Queen's birthday
When I go to the home page
Then I should <see_or_not_see> the Queen's birthday offer banner
Examples:
|time|see_or_not_see|
|15 days before|not see|
|14 days before|see|
||see|
|1 day after|not see|
As Richard wrote, in the step definitions you would know where to
point the browser to for the "I go to the login page" step based on a
JVM variable.
In the continuous integration server, you would then be able to run
all three suites at once, decreasing feedback times. Adding a new
domain would be as simple as writing a new set of properties for it
and configuring the CI server.
Paolo
> --
> -- 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
cu...@googlegroups.com. To
> unsubscribe from this group, send email to
>
cukes+un...@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+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.