Skip to main content

A library of tools to quickly expand UI testing

Project description

sktest

基于selenium的关键字ui快速测试框架,旨在让测试不用再花费大量的时间去编写测试代码或维护代码,只需要设计好你的测试用例,自动化的执行交给我们。

  1. 使用excel编写并维护用例
  2. 以业实际务流程驱动测试
  3. 定位每一个业务步骤的执行情况
  4. 自动生成测试报告,并将用例执行情况及报告发送到指定邮箱

运行环境

  • 操作系统:Windows
  • python版本:3.5+
  • 浏览器:兼容chrome(默认)、Firefox、ie
  • 注:请确保你的driver在环境变量PATH,或者你应该指定executable_path

安装

pip install sktest


快速使用

  1. 新建一个测试项目
  2. 安装sktest
  3. 在项目下新建两个目录---testcase、report
  4. 将测试用例的excel文件放入testcase目录下(测试用例编写格式见下面示例)
  5. 新建一个.py文件,编写代码:'from sktest.run import Run'
  6. 实例化Run对象,调用run(),自动化程序便跑起来了

测试用例示例

case elements

  • 重点:
    • 编写用例的sheet 名字必须是你所指定sheet_name,如果没有配置默认是 'case'
    • 存放元素的sheet 名字必须是 'elements'
    • 用例表单页面和元素列的名字必须和元素表page和element保持一致

自定义配置信息

或者你可以尝试自己配置一些信息,在你创建的py文件修改这些配置信息
  1. 导入
  2. 自行配置测试用例文件的路径(excel_file_path),无需再创建testcase目录
  3. 配置浏览器及driver(browser_name、executable_path),默认的是Chrome,driver会从python安装路径或者PATH获取
  4. 配置邮件信息(email_account、email_password、email_receiver、case_object_name)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sktest-0.1.7.tar.gz (12.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page