In my Laravel project I use Grunt for testing and building client-side code and Codeception to run my acceptance tests. It might be possible to trigger Grunt from Codeception, but I don’t know how. However, to run Codeception from Grunt you should just install the grunt-shell plugin and add the following lines to your Gruntfile.js:
shell: {
codeCeption: {
options: {
stdout: true
},
command: 'php codecept.phar run'
}
}
See also:
I could not a find a Grunt plugin for Codeception, but a Gulp plugin already exists: https://www.npmjs.org/package/gulp-codeception.
If you want grunt to fail if a codeception test fails you need to add the failOnError: true option like and I think the –report flag for the command: