当我尝试使用代码接收运行验收测试时,也会遇到相同的错误。
C:\Users\DEFAULT.DESKTOP-RJ3G5I9\vendor\bin>codecept run acceptance GoogleTest.php
Codeception PHP Testing Framework v4.1.6
Powered by PHPUnit 9.2.6 by Sebastian Bergmann and contributors.
Running with seed:
class TestGoogle
{
public function testGoogle(AcceptanceTester $I)
{
$I->amOnPage('https://www.google.com');
$I->see('Google');
}
}
Acceptance Tests (0) ---------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
No tests executed!
Anybody has any idea on that? Thanks
答案 0 :(得分:0)
您错过了在GoogleTest.php文件顶部打开PHP标签的操作。
还必须在类名的后缀中加上其格式。
您在这里使用的是Cest格式,因此相应的类和文件必须分别命名为GoogleCest和GoogleCest.php。