Codeception: Call to undefined method Codeception\Test\Descriptor::getTestDataSetIndex()
What are you trying to achieve?
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
What do you get instead?
Provide console output if related. Use
-vvv
mode 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
Details
- Codeception version: 2.4.0
- PHP Version: 7.0.1
- Operating System: Win10 and Ubuntu
- Installation type: Composer
- List of installed packages (
composer show
) - Suite configuration:
# 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
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 16 (6 by maintainers)
2.4.1 fixed it for me 🥇
@DavertMik Can you make release 2.4.x after this change? https://github.com/Codeception/Codeception/commit/e76fb09644bcada40d79bee162de46422b198930
Using
2.4.x-dev
will take care of this issue. Confirmed.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
confirmed +1 (v2.4.0)
@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.
I also have the same issue.
PHP Fatal error: Uncaught Error: Call to undefined method Codeception\Test\Descriptor::getTestDataSetIndex()