Vishvajeet
Vishvajeet

Reputation: 41

Passing a variable in codeception through command prompt

As like we pass the browser name and other details from command prompt in codecetion, can we pass any variable which can be used within the script from command prompt?

Upvotes: 4

Views: 1681

Answers (2)

Max Barannyk
Max Barannyk

Reputation: 39

You can get command prompt parameters here: $_SERVER['argv'];

Upvotes: 0

Yuriy Chabaniuk
Yuriy Chabaniuk

Reputation: 21

I didn't find any way to do it in documentation and other feeds.

I add pull request for this ability use params from console in tests

When it will be merged in master you can run tests like this:

php codecept run -p "site-id: 123456, group: admin" -p "duty: free"

You can find more information in PR.

Upvotes: 2

Related Questions