Skip to content

sketchings/symfony-codeception-demo

 
 

Repository files navigation

Symfony Demo Application + Codeception Example

This is a fork of the "Symfony Demo Application".

Codeception has been added for browser testing.

Requirements

Installation

The best way to install this project is with Composer, once it's installed on your computer to run these commands:

# ...clone the code repository and install its dependencies
$ git clone https://github.com/sketchings/symfony-codeception-demo.git my_project
$ cd my_project/
$ composer install

Usage

There's no need to configure anything before running the application.

On your local machine, you can run this command to use the built-in PHP web server:

$ cd my_project/
$ php -S localhost:8000 -t public/

Tests

Selenium is required to launch and control browsers from Codeception. Selenium Server is required to be installed and started before running acceptance tests.

The fastest way of getting Selenium is using selenium-standalone NodeJS Package. It automatically installs Selenium and all required dependencies and starts server. It requires NodeJS and Java to be installed.

$ npm install selenium-standalone -g
$ selenium-standalone install

Launch this command in a separate terminal:

$ selenium-standalone start

Execute this command to run all tests:

$ vendor/bin/codecept run

Or you can run individual suite, individual file, or individual test:

$ vendor/bin/codecept run functional
$ vendor/bin/codecept run functional readBlogCest.php
$ vendor/bin/codecept run functional readBlogCest.php:viewListAndLink

About

Symfony Demo Application + Codeception Examples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 68.8%
  • Twig 20.9%
  • SCSS 5.7%
  • JavaScript 4.0%
  • Gherkin 0.6%