0
votes

I'm trying to set up codeception testing on Yii2. My stack is: vagrant + Selenium + chromedriver +PHP 7.1. Here is my conception config:

    actor: AcceptanceTester
modules:
    enabled:
    - WebDriver:
        url: 'http://localhost:8080/'
        window_size: 1920x1080
        browser: chrome
        capabilities:
            chromeOptions:
                args: ["--no-sandbox", "--headless", "--disable-gpu"]
                binary: "/usr/bin/google-chrome-stable"
    - Yii2:
        part: [orm,email]
        entryScript: index-test.php

config/test.php is equal to config/console.php

Here is some output from console:

     ./yii serve
Server started on http://localhost:8080/
Document root is "/var/www/test/web"
Quit the server with CTRL-C or COMMAND-C.
[Fri Jun  1 12:46:39 2018] ::1:45348 [200]: /
[Fri Jun  1 12:46:52 2018] ::1:45362 [200]: /

Finally I took PageCest the same as HomeCest in basic template and run the tests. Unit testing is working, but acceptance tests return following:

PageCest: Ensure that about page works

Test tests/acceptance/PageCest.php:ensureThatAboutPageWorks

[Error] Class name must be a valid object or a string

This error repeats for all methods is PageCest. What I did wrong ?

1
Please run codeception with -vvv parameter and provide a stacktrace. - Naktibalda

1 Answers

0
votes

The problem was in codeception.yaml. So codeception wad not able to find Actor class. Post attention on spelling and paddings.