Answer the question
In order to leave comments, you need to log in
How to run a test without a console?
I am writing phpunit + selenium tests, everything seems to be normal, but the task appeared to run tests not through the console, but through the browser (the user presses the button to run the test, a get request flies to the server, the test starts), how to implement this?
Answer the question
In order to leave comments, you need to log in
this is understandable in general terms, but how exactly to do it technically.
For example I have a class
class FooBar extends PHPUnit_Extensions_Selenium2TestCase
{
protected function setUp()
{
$this->setHost('localhost');
$this->setPort(4444);
$this->setBrowser('firefox');
$this->setBrowserUrl("http://foo-bar.ru/");
$this->prepareSession()->currentWindow()->maximize();
}
public function testFooBar()
{
$this->url("index.php");
$this->byId('auth_user_name')->value('foo');
$this->byId('auth_user_password')->value('bar');
$this->byCssSelector('input.enter_btn')->click();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question