Giter Site home page Giter Site logo

rain0193 / selenium_python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhangmoumou1/selenium_python

0.0 0.0 0.0 4.14 MB

python selenium自动化测试框架---Excel管理测试用例、记录日志和截图等

Python 77.98% HTML 21.44% AutoIt 0.58%

selenium_python's Introduction

python-selenium(ui自动化)

一、实现步骤参考

1、理解框架各个模块和调用流程(如不理解可参考readme文件下的xmind流程图)

2、以页面为单位编写自动化测试用例

3、封装公共模块(webdriver定位方法、截图、日志、登录、数据读写等)

4、可以先单独写脚本对元素定位和操作进行调试,成功后再引入框架

5、使用PageObject模式来编写测试脚本,实现页面操作、定位、用例、测试数据的分离,提高代码维护性

6、最后可通过Jenkins+tomcat+git持续集成平台,实现脚本的维护、构建控制并输出测试报告

二、框架目录讲解

no view
1、config文件夹:config.ini 配置项目的路径;globalparam.py 封装所有需要获取或者保存的路径,如日志、截图、测试报告、上传文件、测试数据;

2、data文件夹:dataread.py读取excel数据,把字典存储在列表中;datas.xlsx存储测试数据;

3、public文件夹:公共方法的封装,如webdriver操作、logging、读取excel数据、截图、日志、读取配置文件、发送报告;

4、report文件夹:用例失败截图、用例成功截图、存放日志和测试报告;

no view
no view

5、test_case文件夹:page_obj下主要写元素定位和动作流程;*sta.py根据page页面写测试用例;

6、up_files文件夹:根据autoit工具保存上传文件.exe文件;

7、run_ai_test.py:测试用例执行文件并生成测试报告。

selenium_python's People

Contributors

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