你好,我想在那裏我能得到的報告和大量的測試失敗或通過測試案例 下面的代碼工作時,在正常的Java類跑到運行TestNG的類測試用例...運行測試用例TestNG的框架
@Test
public void make() throws InterruptedException{
System.setProperty("webdriver.chrome.driver","C:\\Users\\sasy\\Desktop\\Akhil\\Selenium\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.Jdk14Logger");
driver.get("http://198.57.218.124/CRFGLSPL/Private/login.aspx?ReturnUrl=%2fCRFGLSPL%2fPrivate%2fPatientOrganDamageIntermediateVisit.aspx%3fPatientID%3d2&PatientID=2");
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_txtEmail']")).sendKeys("[email protected]");
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_txtPassword']")).sendKeys("maryme");
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_btnLogin']")).click();
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_btnSubmit']")).click();
driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_btnSubmit']")).click();
//WebElement ID418=driver.findElement(By.xpath("//*[@id='edit41']"));
//WebElement ID830=driver.findElement(By.xpath("//*[@id='edit40']"));
WebElement ID969=driver.findElement(By.xpath("//*[@id='edit37']"));
//WebElement ID472=driver.findElement(By.xpath("//*[@id='edit39']"));
Thread.sleep(3000);
ID969.click();
driver.quit();
}
當上面的代碼跑了作爲TestNG的測試我正在給下面的錯誤
FAILED: make java.lang.NoClassDefFoundError: com/google/common/base/Function at first.heha.make(heha.java:16)
你需要從的testng.xml運行>運行的TestNG的套件 – kushal
http://stackoverflow.com/questions/5134953/noclassdeffounderror-in-java-com-google-common-base-function似乎相似到你的問題 – Grasshopper
如果你的問題是根據你的喜好回答的,請考慮標記其中一個答案作爲答案:[如何標記問題爲答案](https://meta.stackexchange.com/questions/5234/how-does - 接受工作/ 5235#5235) – Thomas