天天看点

自动化测试框架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)!对本框架感兴趣的童鞋加入到框架的开源行动中!

继续阅读