English 中文(简体)
PHPUnit Selenium2 - No Browserase
原标题:PHPUnit Selenium2 - No Browser Instance

在我进行连选试时,无论是在Netbeans IDE,还是从指挥线,例如:

class WebTest extends PHPUnit_Extensions_Selenium2TestCase
{
protected function setUp()
{
    $this->setBrowser( firefox );
    $this->setBrowserUrl( http://www.example.com/ );
}

public function testTitle()
{
    $this->url( http://www.example.com/ );
    $this->assertEquals( Example WWW Page , $this->title());
}

}

我收到了PHPUnit的答复,但似乎与Selenium服务器通信,因为没有创造浏览器窗口。

PHPUnit 3.6.10 by Sebastian Bergmann.

Configuration read from /var/www/gcd/framework/yii/gadget/protected/tests/phpunit.xml

F

Time: 1 second, Memory: 10.50Mb

There was 1 failure:

1) WebTest::testTitle
Failed asserting that null matches expected  Example WWW Page .

利用PHPUnit 3.6.10和 se-server-standalone-2.21.0

是否有任何想法?

最佳回答

简而言之,如果你以 su子为首,它就会发挥作用! Doh!

问题回答

暂无回答




相关问题
PHPunit command line variable on windows giving trouble

I installed PHPunit via the commandline and added it to my path variables.I then tried to see if it will run, but I got a weird error. Must be something in some file that I didn t configure correctly,...

检查单位检测?

我是新鲜的,可以进行单位测试,因此,我想得到一些稍感lu的人的意见。

PHP Unit testing [closed]

Is there any EASY php testing Framework and may be simpler than simpletest and not command line based like PHPUnit ?

Unit Testing (PHPUnit): how to login?

I m writing tests for my current project, made with Zend Framework. Everything s fine, but I have a problem testing the logged users actions/controllers: I need to be logged in to be able to perform ...

determine the http status that will be sent in php

I am trying to write a test case for a class that is managing headers for my application. Among the headers it sends are http status headers. I am using headers_list() to see which headers would be ...

How to test my forms in Zend Framework 1.8+?

So I ve set up testing in my ZF 1.9.5 application thanks to this tutorial, I am able to test my controllers, now I want to create a test for a form. However, I m having the problem that PHPUnit can t ...

unit test a method that creates an object

I m trying to get my head round Unit Testing and there s one more piece of the jigsaw I need to find. What I m trying to do is write tests for the following code. In this case, I ve got a really ...

Running unit tests on both windows and linux

Is there a way, a method, to be able to effectively run unit tests (phpunit) on both linux and windows? I need to do this because some parts of the system is only available under linux, but i do want ...

热门标签