Git Product home page Git Product logo

selenium's Introduction

项目名及简介

  • python3 + selenium自动化测试

介绍

  • unittest参数化
  • PageObject分层管理
  • 用例编写基于yaml配置多关键字驱动
  • 自动生成excel测试报告

命令运行

python runner.py
  • 或者修改start.test.bat中的路径后,直接点击运行

结果展示

日志目录

  • 文件夹:chrome_XXXXX,包含截图
2018-04-29 23:28:09,357  - INFO - ----  test001_登录失败_div.container>ul>li:nth-child(2)_css_click_         ----
2018-04-29 23:28:09,970  - INFO - ----  test001_登录失败_input-lg_class_name_send_keys_lose1        ----
2018-04-29 23:28:10,066  - INFO - ----  test001_登录失败_user_password_id_send_keys_1231231232        ----
2018-04-29 23:28:10,187  - INFO - ----  test001_登录失败_div.form-actions_css_click_         ----
2018-04-29 23:28:10,784  - INFO - ----  test001_登录失败_div.alert-warning_css_ _         ----
2018-04-29 23:28:10,785  - INFO - [CheckPoint_1]: testALoginFail_ : OK
2018-04-29 23:28:36,116  - INFO - ----  test001_登录_div.container>ul>li:nth-child(2)_css_click_         ----
2018-04-29 23:29:41,881  - INFO - ----  test001_登录_input-lg_class_name_send_keys_lose1        ----
2018-04-29 23:30:16,331  - INFO - ----  test001_登录_user_password_id_send_keys_1231231232        ----
2018-04-29 23:30:16,433  - INFO - ----  test001_登录_div.form-actions_css_click_         ----
2018-04-29 23:31:02,425  - INFO - [CheckPoint_2]: testBLogin_==请检查dropdown-avatar==: NG
  • 实时日志

testALoginFail (TestCase.HomeTest.HomeTest) ... ==操作步骤:div.container>ul>li:nth-child(2)_css_click_ ==
==操作步骤:input-lg_class_name_send_keys_lose1==
==操作步骤:user_password_id_send_keys_1231231232==
==操作步骤:div.form-actions_css_click_ ==
==操作步骤:div.alert-warning_css_ _ ==
==用例_登录失败检查点成功==
ok
testBLogin (TestCase.HomeTest.HomeTest) ... ==操作步骤:div.container>ul>li:nth-child(2)_css_click_ ==
==操作步骤:input-lg_class_name_send_keys_lose==
==操作步骤:user_password_id_send_keys_XXX==
==操作步骤:div.form-actions_css_click_ ==
==操作步骤:dropdown-avatar_class_name_click_ ==
==操作步骤://ul[@class='dropdown-menu']/li/a[contains(text(),'lose')]_xpath_ _ ==
==用例_登录检查点成功==
[{'caseName': 'testALoginFail', 'step': '点击登录\n输入用户名\n输入密码\n点击登录\n', 'info': '打开testerhome', 'title': '登录失败', 'checkStep': '错误的密码登录不成功\n', 'id': 'test001', 'msg': '', 'name': 'chrome', 'result': '通过'}]
ok
testHotTopic (TestCase.MyTest.MyTest) ... ==操作步骤:div.container>ul>li:nth-child(2)_css_click_ ==
==操作步骤:input-lg_class_name_send_keys_lose==
==操作步骤:user_password_id_send_keys_xxxx==
==操作步骤:div.form-actions_css_click_ ==
==操作步骤:dropdown-avatar_class_name_click_ ==
==操作步骤:dropdown-avatar_class_name_click_ ==
==操作步骤://ul[@class='dropdown-menu']/li/a_xpath_click_ ==
==操作步骤://ul[@class="list-group"]/li[1]/div/a[2]_xpath_get_text_ ==
==操作步骤:ul.list-group > li:nth-child(1) > div.title > a:nth-child(2)_css_click_ ==
==操作步骤:/html/head/title_xpath_get_text_ ==
==用例_热门话题检查点成功==

测试报告

sum.png

detail.jpg

其他

selenium's People

Contributors

louis-me 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.