基于 SELENIUM 的自動(dòng)化測試架構(43)
發(fā)表于:2017-04-11來(lái)源:gitbook作者:凌俁Linty?點(diǎn)擊數:
標簽:selenium
logIn (String account, String password) throws InterruptedException { BoxDriver driver = this .baseDriver; driver.type( account , account); driver.type( password , password); driver.click( submit ); /
logIn(String account, String password) throws InterruptedException {
BoxDriver driver =
this.baseDriver;
driver.type(
"account", account);
driver.type(
"password", password);
driver.click(
"submit");
Thread.sleep(
2000);
}
至此,自動(dòng)化測試的方案如下圖所示:

-
封裝 Selenium 為 BoxDriver
-
在 測試用例中,實(shí)例化 BoxDriver,產(chǎn)生 bd 對象
-
使用 bd 對象,構造 業(yè)務(wù)模塊的實(shí)例化對象,產(chǎn)生 common
-
使用 common 在測試用例中,構建測試步驟
-
使用數據驅動(dòng)的外部數據,通過(guò)讀取,進(jìn)行測試
-
執行整個(gè)用例
2.5 使用 Git 進(jìn)行源代碼管理
原文轉自:http://gitbook.cn/books/58e54b57cfcd6fa52dcef1d2/index.html