--
Christophe | Stof
That's the exact reason we have `behat.yml` context parameters and relative urls in features.
All environment-specific config should be put inside `behat.yml` and that's your job as a
FeatureContext developer to use them in steps. But, at the same time, your *.feature files
should stay readable for your stakeholders (non-technical people in most cases). Leave
programming details to programming layer (contexts).
On 28 January 2012 at 01:30:13, dam wrote:
My apology, I guess I was not clear enough. I want to switch between
environment and use different set of test data. I am thinking of
reading data from property file into variable. These variables should
be evaluated first before the step execution.
Thanks.
On Jan 27, 4:26 pm, Christophe COEVOET <s...@http://notk.org> wrote:
> Le 28/01/2012 01:10, dam a crit :> I would like to use variables in feature file and evaluate variables
> > before step execution.
>
> > For example:
>
> > Given I navigate to "EnWikiVariable"
> > Then the url should match "EnWikiVariable"
> > Given I navigate to "FrWikiVariable"
> > Then the url should match "FrWikiVariable"
>
> > Appreciate if there are any example of such implementation. Thanks.
>
> what you want seems exactly what scenario outlines are for. Check the
> doc here:http://http://docs.behat.org/guides/1.gherkin.html#scenario-outlines
>
> --
> Christophe | Stof