我不能跑沙希 [英] I can not run sahi

查看:160
本文介绍了我不能跑沙希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
sahi和symfony2

Possible Duplicate:
sahi and symfony2

我想用symfony2测试behat,貂皮和sahi.

I would like to test behat, mink and sahi with symfony2.

在我的config_test.yml文件中

In my file config_test.yml I have

mink:
    base_url:  http://localhost/Symfony_Standard_2.0.15_2/symfony/web/app_test.php    
    default_session: symfony
    sahi: ~

使用时在我的test.feature中

in my test.feature when I use

Scenario: Open page with products list and check it
Given I am on "/hello"
Then the response should contain "hello"

结果很好:

1 scenario (1 passed)
2 steps (2 passed)
0m5.112s

但是当我添加@mink:sahi时我会得到

But when i add @mink:sahi I get

@mink:sahi
Scenario: Open page with products list and check it #             
src\Acme\DemoBundle\Features\test.feature:6
Given I am on "/hello" # Acme\DemoBundle\Features\Context\FeatureContext::visit()
Operation timed out after 5000 milliseconds with 0 bytes received
Then the response should contain "hello" # 
Acme\DemoBundle\Features\Context\FeatureContext::assertResponseContains()

1 scenario (1 failed)
2 steps (1 skipped, 1 failed)
0m5.112s

你有什么主意吗?

推荐答案

我已经解决了这个问题,实际上,在开始测试之前,我们必须运行驱动程序sahi,

i have solved the problem, in fact, we must run the driver sa before starting the test,

这篇关于我不能跑沙希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆