Get Webception working with Laravel
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I'm looking to use Webception for Codeception tests inside a Laravel application.

Here's a rundown of the scenario:

First, I set up Laravel and Codeception:

  • Install fresh Laravel app
  • Add Codeception to composer.json; update dependencies
  • Bootstrap codeception in the app
  • Move codeception.yml from app/ to the root of the Laravel project so it can be run from the root of the project. Then update codeception.yml so the path to tests, logs, data, etc are all within app/tests/
  • Create a new, basic acceptance test and confirm it works from command line.

Then, I follow the instructions from the Webception site:

  • Install via composer create-project jayhealey/webception --stability=dev
  • Make sure permissions are correct
  • Set up a virtual host to load webception on
  • Run webception, confirm it works a-ok with the default tests.

Now comes the final part - getting Webception to run the tests in the Laravel app:

Per the webception instructions, I update the webception customization to include my laravel app:

'sites' => array(

    'Webception' => dirname(__FILE__) .'/../../codeception.yml',
    'myapp' => dirname(__FILE__) .'/../../../myapp/codeception.yml',


Then I load Webception and switch to "myapp". All the Webception checks pass (config, executable, log). However, when I start the tests, I get this error:

Acceptance Tester.php

Codeception PHP Testing Framework v1.8.1
Powered by PHPUnit 3.7.28 by Sebastian Bergmann.
Fatal error: Class 'Codeception\Actor' not found in
/Users/Name/Sites/myapp/tests/acceptance/AcceptanceTester.php on line 25

The line in question: class AcceptanceTester extends \Codeception\Actor

Screenshot of the error in webception.

Crowdsource coding tasks.

0 Solutions