Description
I wanted to understand how testing works with Yii2. I cannot run the acceptance tests.
I am refering to the section Running acceptance tests the README
of this application template repository.
What steps will reproduce the problem?
Install Yii2 basic app template: composer create-project --prefer-dist yiisoft/yii2-app-basic yii2-app-basic-testing
=> App and packages are installed OK
Rename tests/acceptance.suite.yml.example
to tests/acceptance.suite.yml
=> done
Install codeception/codeception
: The package codeception/codeception
is already installed by default composer requirement (so the related line in README seems redundant)
Run Selenium standalone: java -jar -Dwebdriver.chrome.driver=~/chromedriver.exe selenium-server-standalone-3.141.59.jar
=> app is installed OK
Start web server: tests/bin/yii serve
=> server is running OK
Run tests: vendor\bin\codecept run
=> Error, see below
What's expected?
Have all tests run
What do you get instead?
The following error is shown:
In ModuleContainer.php line 115:
Module WebDriver is not installed.
Use Composer to install corresponding package:
composer require codeception/module-webdriver --dev
Install codeception/module-webdriver as per above results in
Your requirements could not be resolved to an installable set of packages.
Also with option --with-all-dependencies (-W)
Additional info
Q | A |
---|---|
Yii version | Current as per composer file in Yii2 App Basic |
PHP version | 8.1.6 |
Operating system | Windows 11 |
Thank you.