클래스에 5 ~ 6 개의 메소드가 있으며 다른 노드에서 병렬로 메소드를 실행하려고합니다. 나는 그것에 4 노드와 그리드 2 설치가 있습니다. 셀레늄 그리드 테스트를 사용하여 테스트를 병렬로 실행
내가있는 테스트 장치를 확장하고 내 테스트 클래스에서 로그인, 일반 및 유틸 클래스Public class TestHarness{
public WebDriver driver = null;
public DesiredCapabilities cap = null;
public Login login;
public Common common;
public void initilize(){
cap = DesiredCapabilities.firefox();
cap.setBrowserName("firefox");
cap.setPlatform(Platform.ANY);
driver = new RemoteWebDriver(new URL(CONFIG.getProperty("hub")),cap);
common = new Common(driver);
login = new Login(driver);
utils = new Utils(driver);
}
}
을 intilizes 내가 테스트 장치를
<suite name="Test" parallel="methods" thread-count="2">
<test name="Test1">
<classes>
<class name="test.LoginTest"/>
</classes>
</test>
</suite>
내 testng.xml, 아래 찾기 @ BeforeMethod intilize 메서드를 호출합니다.
테스트를 실행하면 다음과 같은 문제가 발생합니다.
두 개의 브라우저가 각 노드에서 하나씩 열려 있지만 하나의 브라우저 만 응용 프로그램을 시작하고 다른 브라우저는 시작하지 않습니다.
내가 무엇이 있는지 알려주세요.
당신
이 시도 // testingbot.com/support/getting-started/parallel-junit.html – Urban48