php - Parameters in Behat 3 -


I have written a website with PHP in more than 40 countries. I started developing tests in Behat v3 with many features. done. Occasionally, I need to run a feature / suite on a specific country and specific server.

For example, what do I do:

  php bin / behat --suite = mySuite --env = stg - country = America, IT, CA   

or the environment passed by such a parameter and country to retrieve the URL, I think it is not possible to have a bitter Behat and if not, what type of device can I use? Am I

Thank you!

Everything that goes beyond bin / behat is Behat specific. Yes, yes, this is not possible through the planning criteria. It is easily achieved with environmental parameters, which you can pass before running the script:

  ENV = "stg" COUNTRY = "US, IT, CA" php bin / Behat --suite = mySuite   

In your code, you retrieve them from $ _ server superglobal:

  $ env = $ _SERVER ['ENV']; $ Country = $ _SERVER ['COUNTRY'];    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -