Reputation: 480
Why am I not getting an error when I use PHPUnit + Selenium Server to log in with an email and password that doesn't exists? This is the PHPUnit script.
public function testUserNotExists() {
$this->open('https://dev.example.com/login');
$this->type("id=email", "[email protected]");
$this->type("id=password", "1d0n73x1s7");
$this->click("name=login_user");
}
When I run it, it doesn't show an error
Terminal: phpunit ExampleTest.php PHPUnit 3.6.12 by Sebastian Bergmann.
E...
Time: 29 seconds, Memory: 4.75Mb
There was 1 error:
1) ExampleTest::testTitle
Method assertTitleEquals not defined.
FAILURES! Tests: 4, Assertions: 1, Errors: 1.
Upvotes: 0
Views: 93
Reputation: 2275
You have to write assertions to get some failure. Selenium doesn't know what should (or shouldn't) happen after sending some form.
Upvotes: 1