0

Can anybody provide the run command for Codeception in Yii2 from root folder? I tried

vendor/bin/codecept run 'patt/to/testfile'

but it doesn't work.

2 Answers 2

2

you have to configure the path, where the configuration file is located:

vendor/bin/codeception run -c /path/to/config.yml testsuitename /path/to/testfile

HTH

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. Now, I got the fatal error: class not found when run unit test. Seems to be issue with namespace? or with bootstrap file configuration?
This works fine now. vendor/bin/codeception run testsuitename /path/to/testfile worked for me. Thanks
1

By default your config file codeception.yml is located in tests. As such you can run the command as

vendor/bin/codecept run -c tests/ testsuitename path/to/testfile

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.