HuddleEng / PhantomFlow

Describe and visualise user flows through tests with PhantomJS
MIT License
682 stars 60 forks source link

Question - is it possible to pass data/arguments down to individual tests from script starting phantomflow #52

Closed bryanrasmussen closed 7 years ago

bryanrasmussen commented 7 years ago

Basically I want to do some stuff on top of phantomflow, and to have logic branching based on command line arguments as to whether one runs production or integration tests against a remote url or on the local server.

The easiest for me would be if I can pass my arguments all the way down to the tests that are started by casperjs.

Is that possible or should I use environmental variables instead to do the branching?

jamescryer commented 7 years ago

You can use casperArgs option (see README) then in your test you can use casper.cli.get("foo")

bryanrasmussen commented 7 years ago

ah ok. that is good thanks.

On Fri, Dec 23, 2016 at 12:13 PM, James Cryer notifications@github.com wrote:

You can use casperArgs option (see README) then in your test you can use casper.cli.get("foo")

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Huddle/PhantomFlow/issues/52#issuecomment-268975189, or mute the thread https://github.com/notifications/unsubscribe-auth/AATEQNpNlfPrBIhIcrJ76Ucem5lxE3Olks5rK6zdgaJpZM4LRKFS .