I have a fresh installation of magento2 enterprise on my server, and just to get a feel for how unit tests work. I attempted to run these tests by executing following command. But before I executed this command, I did update dev/tests/integration/etc/install-config-mysql.php.dist with correct database credentials.

php vendor/bin/phpunit -c dev/tests/integration/phpunit.xml.dist

After running command, All I was given in response is unable to read dev/tests/integration/phpunit.xml.dist file. Event I change permission using chmod to 777 and tried again, but same result happened.

What am I doing wrong?

  • Can you post with error i displayed?
    – KAndy
    Feb 18, 2017 at 21:13

2 Answers 2


You have to run the tests inside dev/tests/integration, specifying the configuration file is not enough.

I did not yet figure out why exactly, but somewhere paths relative to the current working directory are used.


Could you please try passing an absolute path to the config file?

php vendor/bin/phpunit -c `pwd`/dev/tests/integration/phpunit.xml.dist

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.