天天看點

自動化測試架構PhoenixAutotest入門介紹入門知識環境入門測試類備注

這裡介紹一個基于selenium實作的一個web自動化測試架構,本架構主要是通過對selenium的封裝實作降低學習自動化測試架構的難度。 

java基礎

jdk1.8、eclipse、maven

可以根據您的習慣來建立java工程或者maven工程。如果是maven工程的話,請添加如下依賴:

我推薦使用maven工程,不建議從github上clone出工程源碼來直接修改。另外,您需要確定工程使用的jdk版本為1.8及以上。按照如下步驟操作:

自動化測試架構PhoenixAutotest入門介紹入門知識環境入門測試類備注

建立好的pom.xml内容應該是:

添加下面是測試類,并運作即可:

如果啟動報錯的話,可能是您的浏覽器版本的問題,請在src/main/resources目錄下建立檔案engine.properties,并添加如下内容指定浏覽器的版本号:

chrome.version=46

<a href="http://surenpi.com/2017/05/25/auto_test_to_die/">自動化測試,從入門到放棄</a>

<a href="http://surenpi.com/2017/06/19/autotest_module/">自動化測試~子產品篇</a>

<a href="http://surenpi.com/2017/06/20/autotest_datasource/">自動化測試~資料源</a>

<a href="http://surenpi.com/2017/06/20/autotest_parameter/">自動化測試~參數化</a>

<a href="http://surenpi.com/2017/06/20/autotest_element_finding/">自動化測試~元素定位</a>

<a href="http://surenpi.com/2017/06/21/autotest_config/" target="_blank">自動化測試~配置</a>

<a href="http://surenpi.com/2017/06/21/autotest_report/" target="_blank">自動化測試~報告篇</a>

<a href="http://surenpi.com/2017/06/19/autotest_class/" target="_blank">自動化測試~課程</a>

<a href="http://surenpi.com/2017/06/26/autotest_annotations/" target="_blank">自動化測試~注解篇</a>

如有感興趣的童鞋可以留言交流(qq群:52492046)!對本架構感興趣的童鞋加入到架構的開源行動中!

繼續閱讀