Selenium 自动化测试之道--学习总结-TestNG

一、环境搭建

使用maven搭建testng测试框架

  1.在apache官网下载并安装maven,解压maven压缩包

  2.配置maven的环境变量  M2_HOME  D:\Program Files\apache-maven-3.0.5

              path  %M2_HOME%\bin;

  3.  找的.m2文件压缩包(里面有打包好的库文件),解压到这个路径%userprofile%下的(C:\Administrator)

  4.在eclipse中修改maven的安装路径:window---->preference---->maven----->installation---->add--->找到maven路径--->ok

  5.在eclipse中创建maven projec

  6.在eclipse中安装testNG插件:打开eclipse---->点击help----> install new software,点击ADD 

  7.输入name:testing     ,location: http://beust.com/eclipse

  1. 等待pending,结束后,编程pending
  2. 取消复选框:show  only  the  latest  of available version
  3. 展开testng ,选择版本6.9.10(testing,,,testing m2e integration)
  4. 按照要求点击下一步
  5. 最后要求重启eclipse

  8.检查eclipse是否安装了插件:右键点击包名---> new ----->other ----->testng class(没有安装成功的话,找不到testNG)

  9.修改pom.xml文件:1.百度maven,选择maven repository;

            2.打开maven repository官网,搜selenium,点击selenium java(基于Java语言),选择版本2.53.1

            3.复制XML代码

猜你喜欢

转载自www.cnblogs.com/mimihuhudeliwu/p/9463906.html
今日推荐