Giter Site home page Giter Site logo

apptest's Introduction

使用说明

  1. 安装配置Mongo数据库

下载地址 mongo是用来存放元素定位的,截图如下: 通过case_id区分每个case的元素定位 里面提供了value, method和text字段,分别作用是定位的值,定位的方法和要输入的文本内容。

  1. 安装Redis

因为被墙,所以给个CSDN下载地址 戳我下载 下载后解压,运行redis-server.exe就行 装Redis的原因, 是因为现在想第一个case初始化(包括登陆),其他的case就不需要重复操作了,到后面最后一个用例结束了之后再关掉driver。所以采用了Redis。 当然肯定有更好的方案,暂时先这样了。

  1. 编写用例

除了需要登陆的第一个用例(继承于BaseNeedLogin), 其他的用例都继承于Base类,重写了tearDownClass这类方法。 编写用例可参照Case002来编写,只需要写test函数就行了,记得带上装饰器(auto_pic),如果需要自动截图的话(现在是报错和正常,结束的时候都会截图)。

  1. 运行用例

参照run_case.py文件里头的suite.addTest()方法,先导入用例,然后再run,后期会增加测试报告以及其他方法。

框架还不完整,会陆续补充更新的。

  1. 测试报告截图

app是我们公司的易途8司导端,账号密码都在mongo数据库里存放了,如果有需要帮忙可以联系我,或者把测试的app改成支付宝这种。

联系方式: QQ619434176

apptest's People

Contributors

wuranxu 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.