Giter Club home page Giter Club logo

test_app_yaml's Introduction

Test_APP_YAML

appium的UI测试,数据与用例分离,实现yaml管理用例

详细介绍,可见个人主页

环境说明

  • windows
  • appium 1.4(后来升级到1.6.4也没有问题)
  • python2.7

yaml用例编写说明

testinfo:
    - id: cm001   
      title: 新增终端门店
      execute: 1          ----主要是用例名称,目前这三个参数没有用到,只是阅读方便
testcase:
    -
      element_info: 客户、com.fiberhome.waiqin365.client:id/cm_topbar_tv_right(来自Uiautomator识别出来)
      find_type:  text  id  xpath  ids
      operate_type: click、sendkeys、swipe_up、back、check        
      index: 0  find_type为ids时用到索引
      times: 上滑或者返回时用到
           

结构介绍

整体结果如图所示:

image

  • logs 用于存放日志
  • page 存放每个模块的page,最小用例
  • public 存放公共方法,如读取yaml、读取配置项、定位点击基础操作
  • results 存放html测试结果和失败截图
  • testcase 存放测试用例
  • testyaml 存放yaml文件
  • HTMLTestRunner.py 生成报告用
  • runtest.py 运行所有测试用例用

第一次优化

  • 增加发送邮件功能
    • readconfig增加读取email参数方方法
    • config.ini增加邮件相关参数
    • Sendemail.py 新增发送邮件公共方法
    • runtest.py 增加发送邮件方法
  • 修复bug
    • BaseOperate.py 中未定位到元素error日志显示问题,%s 加错位置
    • 失败截图,路径修改,screenshoot后加上filapic,要不然会直接生成在reults目录下

0301第二次优化

  • yaml文件operate_type增加check,用于校验
  • 优化了定位元素的方法,增加等待时间
  • BaseOperate.py 文件中,增加check的分支
  • 判断元素是否存在,不存在时增加截图和日志

test_app_yaml's People

Contributors

nj-zero avatar

Watchers

James Cloos avatar

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.