O'Reilly logo

Learning Yii Testing by Matteo Pescarin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interacting with Codeception

So far, we've seen two arguments of the codecept command:

  • build: This is used for building the "testers" and any additional code when using any additional module
  • run: This is used to execute the tests

There are a few parameters you can invoke run with that I'd like to bring to your attention, as these will come handy when running and debugging the tests. The syntax of the run command is as follows:

$ vendor/bin/codecept run [options] [suite] [test]

First of all, you can run a specific suite, such as unit, acceptance, or functional, or be more specific and run a single test file, for example:

$ ../vendor/bin/codecept run acceptance LoginCept.php

Time: 3.35 seconds, Memory: 13.75Mb

OK (1 test, 5 assertions)

In the preceding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required