0

I have a Symfony 2.4.4 site with simple Codeception (2.1.7) acceptance tests setup. When running the acceptance tests I get the following error:

[Codeception\Exception\ConfigurationException]
AcceptanceTester class doesn't exist in suite folder.
Run the 'build' command to generate it

The AcceptanceTester class does exist in the tests/acceptance directory. If I run a build I get the following error:

[Codeception\Exception\ConfigurationException]
Configuration file could not be found.
Run `bootstrap` to initialize Codeception.

The codeception.yml file does exist and contains the following:

actor: Tester
paths:
    tests: tests
    log: tests/_output
    data: tests/_data
    helpers: tests/_support
settings:
    bootstrap: _bootstrap.php
    colors: false
    memory_limit: 1024M
coverage:
    enabled: true
    remote: true
    include:
        - app/*
    exclude:
        - app/cache/*
include:
    ...
modules:
    config:
        Db:
            dsn: ''
            user: ''
            password: ''
            dump: tests/_data/dump.sql

If I run a bootstrap it confirms this:

Project is already initialized in '.'

acceptance.suite.yml contains:

class_name: AcceptanceTester
modules:
    enabled:
        - AcceptanceHelper

Any suggestions?

3 Answers 3

2
  1. AcceptanceTester.php file should be in tests/_support directory. Run codecept build to regenerate Tester files.

  2. You have no modules enabled acceptance.suite.yml. You have to enable one of Symfony2, PhpBrowser and WebDriver.

  3. Your site uses an old version of Symfony and it can cause issues for Codeception if Symfony2 module is used, so I recommend to test it using PhpBrowser or WebDriver.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the tip on AcceptanceTester.php. As above however, the codecept build doesn't work.
0

I believe, you need to run command codecept bootstrap.

1 Comment

As stated above, if I run bootstrap it throws an error: Project is already initialized in '.'
0

I had this problem, and I realise that I ran the codecept bootstrap but the vendor and the tests folders were in a wrong directory.

I followed this video and it helped me.

1 Comment

Please use comments to link external resources, otherwise provide a complete answer with code and explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.