codeception - 未执行任何测试 - 验收测试 Codeception
问题描述
当我尝试使用 codeception 运行验收测试时,我得到了同样的错误。
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
解决方案
您错过了在 GoogleTest.php 文件顶部打开 PHP 标记。
类名也必须具有匹配其格式的后缀。
您在这里使用 Cest 格式,因此类和文件必须相应地命名为 GoogleCest 和 GoogleCest.php。
推荐阅读
- arduino - esp32 cam 设置帧大小失败
- python - 如何存储通过 API 访问的人脸识别应用程序的嵌入?
- java - 在一个语句中从同一个 java 包中导入两个类
- html - 如何使用变量而不是类:contains?
- sql - PhpMyAdmin - 导出与查询结果不同
- python - 为什么 input() 只返回字符串?
- python - 将两个列表合并到字典中,有例外挑战
- python - 机器人框架和 Python - 检查文件是否存在
- sql - 如果语句包含 RETURNING 子句,则 mysql_stmt_bind_result() 失败
- java - 找不到绑定 vaadin 组合框的方法