After today update (Updating codeception/phpunit-wrapper (7.0.2 => 7.0.4)) want to run test as method:
it's not work: codecept run acceptance LoginCest:loginSuccessfully -vvv
it works: codecept run acceptance LoginCest -vvv
Provide console output if related. Use
-vvvmode for more details.
Codeception PHP Testing Framework v2.4.0
Powered by PHPUnit 7.0.2 by Sebastian Bergmann and contributors.
PHP Fatal error: Uncaught Error: Call to undefined method Codeception\Test\Descriptor::getTestDataSetIndex() in D:\AUTOTESTS\test\vendor\codeception\phpunit-wrapper\src\FilterTest.php:23
Stack trace:
#0 [internal function]: Codeception\PHPUnit\FilterTest->accept()
#1 D:\AUTOTESTS\test\vendor\phpunit\phpunit\src\Framework\TestSuite.php(898): FilterIterator->rewind()
#2 D:\AUTOTESTS\test\vendor\codeception\phpunit-wrapper\src\Runner.php(77): PHPUnit\Framework\TestSuite->injectFilter(Object(PHPUnit\Runner\Filter\Factory))
#3 D:\AUTOTESTS\test\vendor\codeception\codeception\src\Codeception\SuiteManager.php(155): Codeception\PHPUnit\Runner->prepareSuite(Object(Codeception\Suite), Array)
#4 D:\AUTOTESTS\test\vendor\codeception\codeception\src\Codeception\Codecept.php(189): Codeception\SuiteManager->run(Object(Codeception\PHPUnit\Runner), Object(PHPUnit\Framework\TestResult), Array)
#5 D:\AUTOTESTS\test\vendor\codeception\codeception\src\Codeception\Codecept.php(158): Codeception\Codecept->runSuite(Array, 'acceptance', 'LoginCest')
in D:\AUTOTESTS\test\vendor\codeception\phpunit-wrapper\src\FilterTest.php on line 23
Fatal error: Uncaught Error: Call to undefined method Codeception\Test\Descriptor::getTestDataSetIndex() in D:\AUTOTESTS\test\vendor\codeception\phpunit-wrapper\src\FilterTest.php on line 23
Error: Call to undefined method Codeception\Test\Descriptor::getTestDataSetIndex() in D:\AUTOTESTS\test\vendor\codeception\phpunit-wrapper\src\FilterTest.php on line 23
Call Stack:
0.0003 381816 1. {main}() D:\AUTOTESTS\cp_autotest\vendor\codeception\codeception\codecept:0
0.0008 403240 2. require_once('D:\AUTOTESTS\cp_autotest\vendor\codeception\codeception\autoload.php') D:\AUTOTESTS\cp_autotest\vendor\codeception\codeception\codecept:7
0.0488 3296008 3. require('D:\AUTOTESTS\test\vendor\codeception\codeception\package\bin') D:\AUTOTESTS\cp_autotest\vendor\codeception\codeception\autoload.php:12
0.1071 5849664 4. Codeception\Application->run() D:\AUTOTESTS\test\vendor\codeception\codeception\package\bin:37
0.1071 5849664 5. Symfony\Component\Console\Application->run() D:\AUTOTESTS\test\vendor\codeception\codeception\src\Codeception\Application.php:108
0.1127 6033688 6. Symfony\Component\Console\Application->doRun() D:\AUTOTESTS\test\vendor\symfony\console\Application.php:148
0.1129 6033688 7. Symfony\Component\Console\Application->doRunCommand() D:\AUTOTESTS\test\vendor\symfony\console\Application.php:248
0.1130 6033688 8. Symfony\Component\Console\Command\Command->run() D:\AUTOTESTS\test\vendor\symfony\console\Application.php:946
0.1143 6040880 9. Codeception\Command\Run->execute() D:\AUTOTESTS\test\vendor\symfony\console\Command\Command.php:252
0.2005 7199112 10. Codeception\Codecept->run() D:\AUTOTESTS\test\vendor\codeception\codeception\src\Codeception\Command\Run.php:355
0.2007 7202384 11. Codeception\Codecept->runSuite() D:\AUTOTESTS\test\vendor\codeception\codeception\src\Codeception\Codecept.php:158
0.2704 9477072 12. Codeception\SuiteManager->run() D:\AUTOTESTS\test\vendor\codeception\codeception\src\Codeception\Codecept.php:189
0.2704 9477096 13. Codeception\PHPUnit\Runner->prepareSuite() D:\AUTOTESTS\test\vendor\codeception\codeception\src\Codeception\SuiteManager.php:155
0.2720 9511344 14. PHPUnit\Framework\TestSuite->injectFilter() D:\AUTOTESTS\test\vendor\codeception\phpunit-wrapper\src\Runner.php:77
0.2742 9536176 15. FilterIterator->rewind() D:\AUTOTESTS\test\vendor\phpunit\phpunit\src\Framework\TestSuite.php:898
0.2742 9536176 16. Codeception\PHPUnit\FilterTest->accept() D:\AUTOTESTS\test\vendor\phpunit\phpunit\src\Framework\TestSuite.php:898
Provide test source code if related
// paste test
composer show)# suite config
suites:
acceptance:
actor: AcceptanceTester
path: .
modules:
enabled:
- WebDriver:
url: http://google.com
browser: chrome
- \Helper\Acceptance
extensions:
enabled: [Codeception\Extension\RunFailed]
params:
- env
gherkin: []
# additional paths
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
settings:
shuffle: false
lint: true
This issue has been fixed recently. check #4835 . update the package. if it still doesn't change a thing clear composer cache, delete composer.lock file, vendor directory and install again.
Still doesn't work, but if i add to composer.json codeception/phpunit-wrapper (7.0.2) - it's works fine, with 7.0.4 - not working.
@fffilimonov this look like a related issue...
https://packagist.org/packages/codeception/codeception
2.4.0 2018-02-27 00:09 UTC
Package was not updated.
There is such method here:
https://github.com/Codeception/Codeception/blob/2.4/src/Codeception/Test/Descriptor.php
Latest wrapper will work now only with 2.4.x-dev codeception
Using 2.4.x-dev will take care of this issue. Confirmed.
We use "iamdevice/codeception-multidb" in our project and with this config it's not working anyway
```{
"require-dev": {
"codeception/codeception": "2.4.x-dev",
"iamdevice/codeception-multidb": "*"
}
}
With this configuration it works:
{
"require-dev": {
"codeception/codeception": "2.4.x-dev",
"iamdevice/codeception-multidb": "*",
"codeception/phpunit-wrapper": "7.0.2"
}
}
```
@DavertMik Can you make release 2.4.x after this change?
https://github.com/Codeception/Codeception/commit/e76fb09644bcada40d79bee162de46422b198930
I have the same issue.
I have the same issue on codeception 2.4.0
I also have the same issue.
I also have the same issue.
PHP Fatal error: Uncaught Error: Call to undefined method Codeception\Test\Descriptor::getTestDataSetIndex()
confirmed +1 (v2.4.0)
it works when run
./vendor/bin/codecept run unit MyHomeTest --debug
but give error when run with
./vendor/bin/codecept run unit MyHomeTest:Demo --debug
now its work for me. i have changed composer.json
add "codeception/phpunit-wrapper": "6.0.5" and update composer
@DavertMik We are waiting for release 2.4.1, because "codeception/codeception": "2.4.x-dev" or adding "codeception/phpunit-wrapper": "6.0.5" in composer.json is not better solution.
2.4.1 fixed it for me 馃
Most helpful comment
2.4.1 fixed it for me 馃