I'm writing an acceptance test suite and I have to make the environments easily configurable, but for this to work I need to be able to merge two or more environments (geoLocation, browser, os, urls).
If I run:
.\codecept run tests\acceptance\acceptanceTestCest --env firefox the tests start running without issues with any environment I choose.
Now my problem is that if I try to merge the environments:
.\codecept run tests\acceptance\acceptanceTestCest --env firefox,US I get the following message :
In Configuration.php line 306:
Suite tests\acceptance\acceptanceTestCest.php was not loaded
And if I try to merge more than two environments i get this message:
Too many arguments, expected arguments "command" "suite" "test".
This is how my acceptance.suite.yml looks like:
browserstack.local: true # for local testing
I looked everywhere for this issue and I did not find anyone that even encountered it. The closest thing I found was that tests would be ran only with the second environment.
I'm new to
Codeception and probably I am missing something.
I read the documentation on https://codeception.com/docs/07-AdvancedUsage#Environments and I don't seem to do anything wrong from there.
Codeception version is 2.4.5
PHP version is 7.2.8
Operating system: Windows server 2012
Installation type: Composer 1.7.2
Things I tried:
Put the environments in _envs folder.
Put the environments in codeception.yml
Other things I cannot remember right now.
If anyone has any idea please share because my head cannot take anymore hits from the desk. If you need more info you can ask.
EDIT: Also I have the project on jenkins as well and merging environments works perfectly there, but if I try to download the exact same project and run it locally it still doesn't work.