All Projects → SeldomQA → Seldom

SeldomQA / Seldom

Licence: apache-2.0
WebUI automation testing framework based on Selenium

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Seldom

Webtau
Webtau (short for web test automation) is a testing API, command line tool and a framework to write unit, integration and end-to-end tests. Test across REST-API, Graph QL, Browser, Database, CLI and Business Logic with consistent set of matchers and concepts. REPL mode speeds-up tests development. Rich reporting cuts down investigation time.
Stars: ✭ 156 (-63.03%)
Mutual labels:  selenium, test-framework
xtd
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.
Stars: ✭ 321 (-23.93%)
Mutual labels:  test-framework, unittest
Recheck Web
recheck for web apps – change comparison tool with local Golden Masters, Git-like ignore syntax and "Unbreakable Selenium" tests.
Stars: ✭ 224 (-46.92%)
Mutual labels:  selenium, test-framework
telenium
Automation for Kivy Application
Stars: ✭ 56 (-86.73%)
Mutual labels:  selenium, unittest
tropic
🍍 Test Runner Library
Stars: ✭ 29 (-93.13%)
Mutual labels:  selenium, test-framework
Nimoy
A testing and specification framework for Python 3
Stars: ✭ 76 (-81.99%)
Mutual labels:  test-framework, unittest
selenified
The Selenified Test Framework provides mechanisms for simply testing applications at multiple tiers while easily integrating into DevOps build environments. Selenified provides traceable reporting for both web and API testing, wraps and extends Selenium calls to more appropriately handle testing errors, and supports testing over multiple browser…
Stars: ✭ 38 (-91%)
Mutual labels:  selenium, test-framework
Bash unit
bash unit testing enterprise edition framework for professionals
Stars: ✭ 419 (-0.71%)
Mutual labels:  test-framework, unittest
specdris
A test framework for Idris
Stars: ✭ 55 (-86.97%)
Mutual labels:  test-framework, unittest
MAQS
Magenic's automation quick start
Stars: ✭ 46 (-89.1%)
Mutual labels:  selenium, test-framework
Wasmite
Now WebAssembly has proper testing, unit-testing and debugging 🤗
Stars: ✭ 20 (-95.26%)
Mutual labels:  test-framework, unittest
Atata
C#/.NET test automation framework for web
Stars: ✭ 362 (-14.22%)
Mutual labels:  selenium, test-framework
sahagin-java
Sahagin generates highly readable Selenium/Appium test report from your test code.
Stars: ✭ 26 (-93.84%)
Mutual labels:  selenium, test-framework
Testfx
MSTest V2 framework and adapter
Stars: ✭ 391 (-7.35%)
Mutual labels:  test-framework, unittest
Serenity Js
A next generation, full-stack acceptance testing framework optimised for collaboration, speed and scale!
Stars: ✭ 346 (-18.01%)
Mutual labels:  selenium
E Commerce Crawlers
🚀电商网站爬虫合集,淘宝京东亚马逊等
Stars: ✭ 377 (-10.66%)
Mutual labels:  selenium
Webdriver manager
Stars: ✭ 340 (-19.43%)
Mutual labels:  selenium
Sanic Ms
基于sanic的微服务基础架构
Stars: ✭ 336 (-20.38%)
Mutual labels:  unittest
Beautifulreport
适用于unittest自动化测试的可视化报告
Stars: ✭ 388 (-8.06%)
Mutual labels:  unittest
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+793.36%)
Mutual labels:  test-framework

PyPI version PyPI - Python Version

WebUI automation testing framework based on Selenium and unittest.

基于 selenium 和 unittest 的 Web UI自动化测试框架。

特点

  • 提供更加简单API编写自动化测试。
  • 提供脚手架,快速生成自动化测试项目。
  • 全局启动和关闭浏览器,减少浏览器的启动次数。
  • 支持用例参数化。
  • 支持用例失败/错误重跑。
  • 定制化HTML测试报告,用例失败/错误自动截图。
  • 支持XML测试报告

安装

> pip install seldom

If you want to keep up with the latest version, you can install with github repository url:

> pip install -U git+https://github.com/SeldomQA/[email protected]

Quick Start

1、查看帮助:

> seldom -h
usage: seldom [-h] [-v] [-project PROJECT] [-r R] [-m M] [-install INSTALL]

WebUI automation testing framework based on Selenium.

optional arguments:
  -h, --help        show this help message and exit
  -v, --version     show version
  -project PROJECT  Create an Seldom automation test project.
  -r R              run test case
  -m M              run tests modules, classes or even individual test methods
                    from the command line
  -install INSTALL  Install the browser driver, For example, 'chrome',
                    'firefox'.

2、创建项目:

> seldom -project mypro

目录结构如下:

mypro/
├── test_dir/
│   ├── data.json
│   ├── test_sample.py
├── reports/
└── run.py
  • test_dir/ 目录实现用例编写。
  • reports/ 目录存放生成的测试报告。
  • run.py 文件运行测试用例。

3、运行项目:

> python3 run.py
2020-05-16 11:34:36,014 INFO
            _      _
           | |    | |
 ___   ___ | |  __| |  ___   _ __ ___
/ __| / _ \| | / _` | / _ \ | '_ ` _ \
\__ \|  __/| || (_| || (_) || | | | | |
|___/ \___||_| \__,_| \___/ |_| |_| |_|
-----------------------------------------
                             @itest.info

2020-05-16 11:34:38,798 INFO ✅ Find element: id=kw
2020-05-16 11:34:38,813 INFO 🖋 input 'seldom'.
2020-05-16 11:34:38,991 INFO ✅ Find element: css selector=#su
2020-05-16 11:34:39,004 INFO 🖱 click.
2020-05-16 11:34:40,091 INFO 👀 assertIn title: seldom_百度搜索.
2020-05-16 11:34:40,092 INFO generated html file: file:////Users/tech/mypro/reports/2020_05_16_11_34_36_result.html
.1%

4、查看报告

你可以到 mypro\reports\ 目录查看测试报告。

test report

Documents

simple demo

请查看 demo/test_sample.py 文件

import seldom


class YouTest(seldom.TestCase):

    def test_case(self):
        """a simple test case """
        self.open("https://www.baidu.com")
        self.type(id_="kw", text="seldom")
        self.click(css="#su")
        self.assertTitle("seldom_百度搜索")


if __name__ == '__main__':
    seldom.main()

说明:

  • 创建测试类必须继承 seldom.TestCase
  • 测试用例文件命名必须以 test 开头。
  • seldom的封装了assertTitleassertUrlassertText等断言方法。

Run the test

import seldom

seldom.main()  # 默认运行当前测试文件
seldom.main(path="./")  # 当前目录下的所有测试文件
seldom.main(path="./test_dir/")  # 指定目录下的所有测试文件
seldom.main(path="./test_dir/test_sample.py")  # 指定目录下的测试文件

说明:

  • 如果指定的目录,测试文件必须以test 开头。
  • 如果要运行子目录下的文件,必须在子目录下加 __init__.py 文件。

seldom 文档

请阅读下面的文档,帮助你快速学会Seldom。

项目实例

如果你想快速的使用seldom开发自动化测试,请参考这个项目。

https://github.com/BarryYBL/UIAutoDemo

感谢

感谢从以下项目中得到思路和帮助。

交流

QQ群:948994709

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].