您的位置:軟件測(cè)試 > 開源軟件測(cè)試 > 開源功能測(cè)試工具 > Selenium
Selenium自動(dòng)化測(cè)試框架的搭建
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 2014/1/7 16:53:42 ] 推薦標(biāo)簽:自動(dòng)化測(cè)試 Selenium 測(cè)試工程

2.      運(yùn)行ant腳本以后,可以生成相應(yīng)的junit日志。

    selenium日志

當(dāng)運(yùn)行junit腳本時(shí),selenium相關(guān)的腳本會(huì)產(chǎn)生回放日志,但默認(rèn)記錄的東西可讀性太差了,所以我們使用loggingSelenium(http://loggingselenium.sourceforge.net/usage.html) ,可以將每個(gè)case可以生成記錄selenium命令的html格式的result了。

4.      plugin的下載地址:

http://sourceforge.net/projects/loggingselenium/files/loggingselenium/Release%201.2/logging-selenium-1.2.jar/download

5.      安裝方法:只需要將下載的logging-selenium-1.2.jar導(dǎo)入到工程里即可。

6.      編寫代碼如下

@Before

public void setUp() {

   finalString resultPath ="absolute-path-to-where-your-result-will-be-written";

   finalString resultHtmlFileName = resultPath + File.separator +"result.html";

   finalString resultEncoding = "UTF-8"

   loggingWriter = LoggingUtils.createWriter(resultHtmlFileName,resultEncoding);

上一頁12345下一頁
軟件測(cè)試工具 | 聯(lián)系我們 | 投訴建議 | 誠(chéng)聘英才 | 申請(qǐng)使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd