Code Monkey home page Code Monkey logo

pomp_ui's Introduction

UIAUTOTEST_POMP 自动化测试

工程目录

  • Project/: 系统名称
    • base UI测试基础类
    • plugins.arrow 测试用例监控类
    • Config/: 配置文件
    • res/driver 浏览器驱动
    • res/page 元素定位
    • res/testcase 用例文件
    • util 工具类文件
    • data 存放公共数据,以及运行过程保存的数值
    • result 存放结果(包括日志,截图等)
    • test_case/: 接口测试用例
    • util.TestCaseFactoryForAll: 根据excel表的用例,自动生成java用例文件
    • testNG.xml 用例集运行触发入口

环境配置

  • jdk 1.8
  • idea/eclipse
  • maven

实现功能

  • XML管理元素对象信息
  • 统一的操作API风格,action.操作(某个页面.某个元素)
  • 数据驱动
  • 关键字驱动
  • 用例失败自动截图并展示到报表中
  • 自动生成html报表
  • 用例串行一次性执行多个浏览器,可用于兼容性测试

说明

  1. 该项目为maven项目,首次执行先把pom下的相关依赖包下载
cd /d porject
maven install
  1. res/page下创建userPage.xlsx文件,内容如下: 元素定位编写

  2. res/testcase 下编写用例use.xlsx,每个sheet为一个用例编号,内容如下: 用例表编写

  3. 执行util.TestCaseFactoryForAll.java 文件会按照testcase下的excel表的sheet生成src/text下的用例文件名字是sheet用例编号,如下: 生成java文件用例

  4. testng.xml配置,按要求配置对应参数 ,并添加运行的用例集,如:

<test name="G_账号管理" preserve-order="true">
	<classes preserve-order="true">
		<class name="com.wymall.test.testcases.system.user.UserPage_001_addUser_Test" />
		<class name="com.wymall.test.testcases.system.user.UserPage_002_setRole_Test" />
		<class name="com.wymall.test.testcases.system.user.UserPage_003_setParkingGroup_Test" />
	</classes>
</test>
  1. 运行可以通过testNG.xml运行,也可以通过pom构建运行
  • testNG.xml: 右击testNG文件-->run as --> testNG suit

  • pom.xml : 右击pom文件-->run as --> Maven Test

  1. 查看测试报告及日志文件 用例执行完毕,会自动生成测试报告文件;用例失败会自动截图并将其展示在报告中,测试报告文件生成在项目根目录下test-out/html目录下report.html文件 报告展示如下: 报告

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.