我有以下情形的:贝哈特步骤定义有时执行有时不
@wip
Scenario: Attempt to get account information of an activator without credentials
Given an activator with e-mail "[email protected]" and password "testpassword" already exists
When I send a GET request to "/activators/1"
Then the response code should be 401
@wip
Scenario: Attempt to get account information of another activator then myself
Given an activator with e-mail "[email protected]" and password "testpassword" already exists
And an activator with e-mail "[email protected]" and password "testpassword" already exists
And I am authenticating as "[email protected]" with "testpassword" password
When I send a GET request to "/activators/1"
Then the response code should be 401
数据库每隔方案之前下降,从架构重新创建。
步骤'给予激活器...'将新用户插入到数据库中。
但是!它并不总是为两个用户做到这一点。
这是分步实施:
/**
* @Given /^an activator with e-mail "([^"]*)" and password "([^"]*)" already exists$/
*/
public function anActivatorWithEMailAndPasswordAlreadyExists($email, $password)
{
$activatorManager = $this->getContainer()->get('am.manager.activator');
#$logger = $this->getContainer()->get('logger');
#$logger->debug("Email: $email, password: $password");
$activator = $activatorManager->createActivator($email, $password);
$activatorManager->save($activator);
}
现在奇怪的事情:
在这最后一步,我应该得到两个插件:一个用于dietervds,eviltwin之一。
我得到了两个插件,当我:
- 只运行一个场景
- 输出的东西在日志(创建“记录仪”没有帮助,我需要输出的东西我没有按输出。 “T必须是动态的,它可以只是一个固定的字符串)
我只得到一个接插件(适用于dietervds)当我:
- 运行两个方案一起
- 或当我在步实施
不输出任何记录,我完全被这个困惑。
有没有明显的缺失?可能是步骤定义中的某种缓存问题? (日志可能会更改签名什么的,不知道)
欢迎任何的反馈:-)
干杯!
Dieter
感谢您的答复mugafuga! 我很确定它没有实际执行AJAX调用。但不幸的是,我再也不能检查了。也许你的回答会帮助一个有类似问题的人。 – Dieter 2013-01-11 11:17:50