2
我注意到,每当运行CEST类型的测试用例时,它们会在完成之后保留它们的会话。换句话说,其他测试可能从继续进行,在此之前的测试将从开始。例如:如何在代码中编写正确的Cest格式测试?
class CheckGoogleSearch{
public function checkIfPageIsAccessible(AcceptanceTester $I){
$I->amOnPage('/');
$I->see('something..');
}
public function checkIfSearchFieldIsAccessible(AcceptanceTester $I){
// Notice, that it is assumed that we are on the google's home page,
//because the above test had it already opened in the past
$I->see('Google Search');
}
}
该代码可以被认为是最佳实践吗?或者将来会出现错误倾向,在每次测试之前重新设置Google的主页并做一些额外的准备工作会更好吗?
这是一个错误:https://github.com/Codeception/Codeception/issues/2586 – Naktibalda