Skip to content

Instantly share code, notes, and snippets.

@javigomez
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javigomez/12195d3d4980c0c93518 to your computer and use it in GitHub Desktop.
Save javigomez/12195d3d4980c0c93518 to your computer and use it in GitHub Desktop.
Codeception

Codeception

Create project

Create a codeception project

php codecept.phar bootstrap

Build actors

php codecept.phar build

Basics

Execute tests

Tests can be started with the run command.

php codecept.phar run

# With the first argument you can run tests from one suite.
php codecept.phar run acceptance

# To run exactly one test, add a second argument. Provide a local path to the test, from the suite directory.
php codecept.phar run acceptance SigninCept.php

# Alternatively you can provide full path to test file:
php codecept.phar run tests/acceptance/SigninCept.php

# You can provide a directory path as well:
php codecept.phar run tests/acceptance/backend

Others

Generate:

# txt Cetp
php codecept.phar generate:cept acceptance VisitAllPages

# page object
php codecept.phar generate:pageobject acceptance UserLogin

# step pages
php codecept.phar generate:stepobject acceptance Member

# txt scenarios
php codecept.phar generate:scenarios acceptance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment