Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yii2 install, configure and run codeception tests

I'm writing this because yii2 official documentation is still not complete and codeception documentation itself refer to yii2 official docs..:).

I have some questions:

  • In my yii2 app root there is a directory "tests/codeception", this means that codeception is already installed in my project?
  • in vendor/yiisoft there is another codeception directory "yii2-codeception" what is it?
  • the documentation say to create a yii2_basic_tests database and to run a migration, but migration script create only a "migration" table, is it correct?
  • the integration with yii2 provide some web interface or I must run the tests from console scripts?

Someone can explain me how to install and configure codeception in yii2 basic app step by step?

Thank you

Alessandro

like image 330
AleCat83 Avatar asked Dec 03 '22 17:12

AleCat83


1 Answers

I am doing some like that:

composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*"

And next:

ln -s ~/.composer/vendor/bin/codecept /usr/local/bin/codecept

Then I am available to do globally

codecept run
like image 194
Adam Michna Avatar answered Dec 11 '22 10:12

Adam Michna