什麼是錯誤的設置環境的代碼無法運行該代碼成立之後TestNG的不運行
親切指導它
package tc1;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class TC001 {
WebDriver driver;
@BeforeClass
public void launchBrowser(){
FirefoxDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(50000, TimeUnit.SECONDS);
}
@Test
public void login(){
driver.get("http://www.meritnation.com/testprep");
driver.findElement(By.className("login-link")).click();
//Thread.sleep(50000);
}
@AfterClass
public void browserClose(){
driver.quit();
}
}
有顯示零遊程和零故障運行TestNG的輸入代碼here
[TestNG的]運行: C:\用戶\用戶\應用程序數據\本地\ TEMP \ TestNG的-蝕 - 1256807320 \ TestNG的-customsuite.xml
===============================================默認的測試
測試運行:0,失敗:0,跳過:0
============================ ===================默認套房
總測試運行:0,失敗:0,跳過:0
[TestNG的]時間採取[FailedReporter通過= 0失敗= 0跳過= 0]:3 ms
[TestNG]時間採取 [email protected]:1毫秒
[TestNG的]採取[email protected]時間:
[TestNG的]時間採取的56毫秒
[email protected]:26 毫秒[TestNG的]時間採取 [email protected]:9毫秒
[TestNG的]採取 org.testng時間.reporters.SuiteHTMLReporter @ 6bf2d08e:66 ms
你是如何引發的考驗嗎? –