使用PHPUnit和Selenium设置测试

Can you help me with setting up my test enviroment please. I'm running on Ubuntu, have selenium web server installed (and running), and trought PHPUnit I'm executing my tests. Most propably I've got stucked on some small error, but I have no I idea how to fix it now.

my code is simple

class WebTest extends PHPUnit_Extensions_Selenium2TestCase 
{
protected function setUp()

{
    $this->setBrowser('firefox');
    $this->setBrowserUrl('http://www.google.com/');
}

public function testTitle()
{
    $this->url('http://www.google.com/');
    $this->assertEquals('google', $this->title());
}

but getting this error

PHP Fatal error: Class 'PHPUnit_Extensions_Selenium2TestCase' not found in /home/jozef/vendor/phpunit/phpunit-selenium/WebTest.php on line 4

Selenium I have installed

Can you please help me move on ? Thank you :)

查看全部
doudeng5764
doudeng5764
2015/11/21 16:33
  • selenium
  • testing
  • webdriver
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复