이 글을 게시하기 전에이 사이트와 Google에서 내 문제를 파악하기 위해 많은 것을 확인했습니다. Symfony2 프레임 워크를 사용하여 주로 PHP로 코딩 된 웹 응용 프로그램을 테스트하고 있습니다.Selenium-PHPUnit, Selenium Grid
셀렌을 사용하여 기능 테스트를하고 있습니다. 지금 당장은 Selenium Grid를 사용하여 로컬 컴퓨터에서 기능 테스트를 병렬로 실행하기 만하면됩니다. 내가 뭘하는지 셀레늄 IDE에서 테스트를 기록하고 phpunit 형식으로 테스트 케이스를 내보낼 수 있습니다. 셀레늄 그리드를 사용하려고했지만 phpunit 테스트가 순차적으로 실행됩니다.
내가 무슨 짓을 :
1) 자바 -jar 셀레늄 - 서버 - 독립 - 2.24.1.jar -role 허브
2) java -jar selenium-server-standalone-2.24.1.jar -role node -hub http://localhost:4444/grid/register -browser "browserName=firefox,maxInstances=2,maxSession=2"
3) 개미
내 빌드에있다 코드의 이러한 부분이 존재 내에서 phpunit.xml
<target name="phpunit" description="Run unit tests">
<exec executable="phpunit" failonerror="true"/>
</target>
:하십시오 phpunit을 대상 .XML
을<testsuites>
<testsuite name="LoginSuite">
<file suffix="Test.php">../../src/Tests/FunctionalTests/LoginSuite_testLoginTest.php</file>
</testsuite>
</testsuites>
그리고 내 LoginSuite_testLoginTest.php은 다음과 같습니다
<?php
namespace Tests\FunctionalTests;
use Tests\FunctionalTests\SetUpTest;
class LoginSuite_testLoginTest extends SetUpTest
{
public function testLogin()
{
$this->open("/home");
$this->click("link=Login");
$this->type("id=username", "[email protected]");
$this->type("id=password", "test");
$this->click("id=_submit");
$this->waitForPageToLoad("30000");
}
public function testLogin2()
{
$this->open("/home");
$this->click("link=Login");
$this->type("id=username", "[email protected]");
$this->type("id=password", "test");
$this->click("id=_submit");
$this->waitForPageToLoad("30000");
}
}
?>
세 번째 단계에서 내가 500 문제에 접근/셀레늄 서버/드라이버 부두 오류를 얻고 개미 명령을 실행할 때/
java -jar selenium-server-standalone-2.24.1.jar -role node -hub http://localhost:4444 /grid/register -browser "browserName=firefox,maxInstances=2,maxSession=2"
내가 -browser의 정보없이 같은 명령을 내 테스트를 시작 않습니다 경우 대신하고
그러나 평행하지는 않습니다 ... 그래서 이상합니다.
필자는 phpunit 테스트를 병렬로 실행하기 위해 자체 스크립트를 만들어야한다는 것을 알았습니다. 그래서이 경우에는 셀레늄 그리드가 필요한지 아닌지 ?? 나 엄청 혼란스러워. 당신의 도움을 주셔서 감사합니다.