【发布时间】:2014-06-10 06:04:04
【问题描述】:
我在使用 PHPUnit 和 Selenium 扩展时遇到了一个奇怪的问题:我通过 Composer 安装了两者的最新(稳定)版本。之后我从一个简单的测试类开始:
<?php
class TestLogin extends PHPUnit_Extensions_Selenium2TestCase {
public function setUp() {
$this->setBrowser('firefox');
$this->setBrowserUrl('http://dev.mydomain.com:10088/');
}
public function testHasLoginForm() {
$this->url('user/login');
$email = $this->byName('email');
$password = $this->byName('password');
$this->assertEquals('', $email->value());
$this->assertEquals('', $password->value());
}
public function testSomething()
{
$this->assertEquals('x', 'y');
}
}
现在,当我通过
运行测试时vendor/bin/phpunit --bootstrap vendor/autoload.php --testsuite Test --debug TestLogin.php
PHPUnit 报告
Starting test 'TestLogin::testHasLoginForm'.
S
Starting test 'TestLogin::testSomething'.
S
有谁知道为什么这两个测试都被标记为“已跳过”?任何帮助将不胜感激。
【问题讨论】:
标签: selenium selenium-webdriver phpunit