No description, website, or topics provided.
Pull request Compare This branch is 3 commits ahead of janhenkgerritsen:codeception-2.3.
Permalink
Failed to load latest commit information.
app Add tests for application handler functionality Mar 24, 2017
bootstrap Upgrade to Laravel 5.1 Jul 8, 2015
config Update for Laraval 5.4 and remove LaravelCollective dependency Jan 25, 2017
database Created separate suite to test the database seeder functionality Jan 25, 2017
homestead @ 69e1e46 Added submodule reference Jun 9, 2016
public Try a lighter version of the auth scaffolding. Jan 9, 2015
resources Update for Laraval 5.4 and remove LaravelCollective dependency Jan 25, 2017
storage Views. Jan 5, 2015
tests Add tests for application handler functionality Mar 24, 2017
.env.example Make use of a testing specific database Jan 27, 2015
.env.testing Make use of a testing specific database Jan 27, 2015
.gitattributes Initial commit Oct 25, 2014
.gitignore Add Homestead for this project Jun 1, 2016
.gitmodules Add Homestead for this project Jun 1, 2016
.travis.yml added php 7.2 and removed hhvm Sep 28, 2017
Homestead.yaml Small tweaks for Vagrant functionality Jun 15, 2016
Vagrantfile Fix path Jun 1, 2016
after.sh Match command from travis Jun 1, 2016
artisan Update for Laravel 5.0 release Feb 5, 2015
codeception.yml Setup code coverage config Jul 8, 2015
composer.json upgraded to Laravel 5.5 Sep 28, 2017
gulpfile.js updated elixir description in gulpfile from sass to less Jan 22, 2015
package.json Fix alignment Nov 21, 2014
phpspec.yml Add PHPSpec config file and dependency Sep 28, 2014
phpunit.xml working on some configuration changes. Dec 4, 2014
readme.md updated readme Sep 28, 2017
server.php Add back in server file. Jan 20, 2015

readme.md

Sample Laravel Application with Codeception tests.

Build Status

Setup

You can setup this sample manually or use Vagrant to automatically set up a development environment for you.

Manual

  • Clone repo
  • Create your .env file from the example file: cp .env.testing .env
  • Install composer dependencies: composer install
  • Create databases by creating the following files:
    • storage/database.sqlite
    • storage/testing.sqlite
  • Run the following commands:
    • php artisan migrate
    • php artisan migrate --database=sqlite_testing
  • Server: run php -S localhost:8000 -t public
  • Browse to localhost:8000/posts

Vagrant

  • Clone repo
  • Cd into the cloned directory
  • Install git submodules: git submodule update --init --recursive
    • you can also add the --recursive flag to the git clone command to skip this step
  • Run vagrant up

To SSH into the machine to run your tests, run vagrant ssh. You can access the app on the guest VM under http://192.168.10.10/.

To test

Run Codeception, installed via Composer

./vendor/bin/codecept build
./vendor/bin/codecept run

Tests

Please check out some good test examples provided.

Functional Tests

Demonstrates testing of CRUD application with

  • PageObjects
  • authentication (by user, credentials, http auth)
  • usage of session variables
  • routes
  • creating and checking records in database
  • testing of form errors

API Tests

Demonstrates functional testing of API using REST and Laravel5 modules connected, with

  • partial json inclusion in response
  • GET/POST/PUT/DELETE requests
  • check changes inside database