Installing Codecept through Composer it’s fairly easy just make sure to update your composer.json file and add the following code in the require-dev object
And do a composer update.
Check that you have the command to use it. If you have after entering the command it should list all the available commands.
The next thing to do it’s initialize it.
The command will create a directory structure for your tests if you want to change the route for this just update the codeception.yml file.
Now under it’s file structure it will contain 3 configuration files for the tests.
Those files contains the modules that codecept will use under each suite. By default it only contains the Filesystem and the FunctionalHelper modules.
How I’m working with laravel it will be ok to add the Laravel4 and the Asserts modules. Make sure if you edit this files to run the command to update it.
To create a new testing file just run the command for the suite that you want to use.
vendor/bin/codecept generate:cept functional [NAME_OF_THE_TEST]
Now you’re able to create a “fast” test for your application.
If you are using Laravel like me take in account that if you run a test it will set the environment to “testing” so make sure that you have your configurations setted.
I know this it’s not a full guide to do the tests but you can check for the commands available to you in the official documentation, or if you want you can watch this video it’s from LaraCasts so you need to pay, but it will be the best money spend ever!