GithubHelp home page GithubHelp logo

qtaf's Introduction

QTAF

Build Status PyPi version GitHub tag

QTA is a cross-platform test automation tool for servers and native, hybrid and applications.

Supported Platforms

  • iOS (powered by QT4i driver)
  • Android (powered by QT4A driver)
  • Web (powered by QT4W driver)
  • Windows (powered by QT4C driver)
  • macOS (powered by QT4Mac driver))
  • Server (powered by QT4S driver)

QTAF (QTA Framework) is a base framework for QTA, including,

  • testbase
  • tuia

Testbase

Testbase is a test framework providing test execution, reporting and management, and is the common base for each platform-specific QTA driver.

For more inforamtion about quick startup, usage and API reference, please read testbase's document.

TUIA

TUIA (Tencent UI Automation) is a base framework for UI test automation, which is used by each platform-specific QTA driver for client.

For more inforamtion about quick startup, usage and API reference, please read TUIA's document.


QTA是一个跨平台的测试自动化工具,适用于后台、原生或混合型客户端应用的测试。

平台支持

  • iOS (由QT4i driver提供)
  • Android (由QT4A driver提供)
  • Web (由QT4W driver提供)
  • Windows (由QT4C driver提供)
  • macOS (由QT4Mac driver提供)
  • Server (由QT4S driver提供)

QTAF (QTA Framework)是QTA的基础框架,包括以下模块:

  • testbase
  • tuia

Testbase

Testbase是测试框架基础,提供包括测试执行、报告和用例管理等基础功能。Testbase会被各个平台的QTA Driver所使用。

快速入门、使用和接口文档请参考《Testbase文档》。

TUIA

TUIA (Tencent UI Automation)是UI自动化基础库,为QTA各个平台下的客户端UI测试Driver所使用。

快速入门、使用和接口文档请参考《TUIA文档》。


欢迎加入QQ群(432699528)交流使用和反馈

qtaf's People

Contributors

alexwjxie avatar drunkdream avatar eeelin avatar jerryginger avatar jin10086 avatar ming5024 avatar treehole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qtaf's Issues

Testbase文档 不存在

链接进去,似乎文档不存在?

  \          SORRY            /
     \                         /
      \    This page does     /
       ]   not exist yet.    [    ,'|
       ]                     [   /  |
       ]___               ___[ ,'   |
       ]  ]\             /[  [ |:   |
       ]  ] \           / [  [ |:   |
       ]  ]  ]         [  [  [ |:   |
       ]  ]  ]__     __[  [  [ |:   |
       ]  ]  ] ]\ _ /[ [  [  [ |:   |
       ]  ]  ] ] (#) [ [  [  [ :===='
       ]  ]  ]_].nHn.[_[  [  [
       ]  ]  ]  HHHHH. [  [  [
       ]  ] /   `HH("N  \ [  [
       ]__]/     HHH  "  \[__[
       ]         NNN         [
       ]         N/"         [
       ]         N H         [
      /          N            \
     /           q,            \
    /                           \

html报告详细页面bug

点击详细页面,进入单个用例详细页面,如果有错误,在最上面点击查看详情连接,没有反应

关于报告优化

关于报告优化,有如下几点建议(主要是html报告):

1.报告中的格式,pre_test,run_test,post_test能不能在报告中明显区分一下
2.针对步骤打印提供折叠功能,可以简单看出报告步骤
3.提供筛选功能,可以帅选日志级别显示

pip3 install qtaf failed at 5.4.0

正常情况下,会遇到:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 1744: illegal multibyte sequence
这是因为setup.py在读取description的时候,文件是utf8编码了,系统使用了默认的gbk编码去读取,会导致编码问题

创建工程脚手架工具优化

  • 标准模式创建的工程,生成requirements.txt并且将qtaf添加到依赖
  • 修改manage.py内容,去掉对exlib的加载
  • 考虑将server、pc、android、ios这类的命名前缀去掉
  • 测试基类的命名大小写优化
  • 考虑增加.gitignore和.gitattributes文件,减少用户的误提交

【增强】tag标签,建议支持多标签的交集功能

如题所示,当前多标签,如果遇到同一个用例被打了2个标签,如果执行的时候,多标签就是这2个的话,该用例会执行2次,所以建议,增加多标签交集功能,即如果2个标签都有,且为同一个用例,则执行一次即可。

尝试生成json报告失败;指定output提示无法识别参数,不指定output又提示缺失参数

❯ python manage.py runtest testcase.atomic.tcsplatform --report-type json --title 0921 --output 0921.json
usage: Run QTA testcases [-h] [-w WORKING_DIR] [--priority {BVT,High,Normal,Low}]e 0921 --output 0921.json ─╯
[--status {Design,Implement,Ready,Review,Suspend}] [--excluded-name EXCLUDED_NAME] [--owner OWNER]
[--tag TAG] [--excluded-tag EXCLUDED_TAG] [--report-type {empty,stream,xml,json,html}]
[--report-args REPORT_ARGS] [--report-args-help {empty,stream,xml,json,html}]
[--resmgr-backend-type {local}] [--runner-type {basic,multithread,multiprocess}]
[--runner-args RUNNER_ARGS] [--runner-args-help {basic,multithread,multiprocess}]
[--execute-type {random,sequential}] [--share-data SHARE_DATA] [--global-parameters GLOBAL_PARAMETERS]
[--config-file CONFIG_FILE]
[TEST ...]
Run QTA testcases: error: unrecognized arguments: --title 0921 --output 0921.json
❯ python manage.py runtest testcase.atomic.tcsplatform --report-type json
usage: runtest <test ...> --report-type [--report-args ""] ─╯
manage.py: error: the following arguments are required: -o/--output

python manage.py runtest --report-args-help html执行报错

环境:
macOS: 10.14.5
python3.6
IDE:Pycharm

在manage.py同级目录执行命令python manage.py runtest --report-args-help html报如下错误。
Traceback (most recent call last):
File "manage.py", line 24, in
ManagementTools().run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/testbase/management.py", line 687, in run
cmds = self._load_cmds()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/testbase/management.py", line 640, in _load_cmds
cmds += self._load_cmd_from_module(sys.modules[name])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/testbase/management.py", line 663, in _load_cmd_from_module
cmds.sort(lambda x, y:cmp_func(x.name, y.name))
TypeError: must use keyword argument for key function

"python manage.py dist" failed on macos

reproducing recipe:

under macos, python==2.7.10

qta-manage createproject foo
cd footestproj
echo qtaf > requirements.txt
python manage.py dist

error:

  File "/Users/guying/workspace/QTAF/testbase/dist.py", line 203, in _generate_sdist
    reqs = self._merge_requirements()
  File "/Users/guying/workspace/QTAF/testbase/dist.py", line 182, in _merge_requirements
    reqs_dict[it.name] = str(it)
AttributeError: Requirement instance has no attribute 'name'

self.assert_ 缩进在 if 或 for 下面断言失败时不能将对应的值信息打印出来

举个例子:

  1. 当 self.assert_ 没有缩进在 if 或 for 下面,断言失败时可以展示断言的实际值 [检查 status_code = 0] assert 200 == 201
    def run_test(self):
        response = self.channel.get(self.uri.uniprorec_publish_range_list)
        self.assert_(f'检查 status_code = 0', response.status_code == 201)
ASSERT: 检查点不通过
  File ".../UniAutoTest/testcases/recommend_list/test.py", line 31, in run_test
    self.assert_(f'检查 status_code = 0', response.status_code == 201)
 [检查 status_code = 0] assert  200 == 201
 +  where 200 = <qt4s.channel.http.HttpResponse object at 0x7f9202e282d0>.status_code
  1. 当 self.assert_ 缩进在 if 下面,断言失败时只展示了异常堆栈信息,未打印出response.status_code实际值
    def run_test(self):
        response = self.channel.get(self.uri.uniprorec_publish_range_list)
        if True:
            self.assert_(f'检查 status_code = 0', response.status_code == 201)
ASSERT: 检查点不通过
  File ".../UniAutoTest/testcases/recommend_list/test.py", line 34, in run_test
    self.assert_(f'检查 status_code = 0', response.status_code == 201)
检查 status_code = 0

--report-args无法识别

输入命令python manage.py runtest zoo --report-type html -w test_result --report-args "--title zootest"
实际上会出现
QTA> manage.py: error: unrecognized arguments: --title zootest
各种空格都试过了,但仍然没能成功执行,我想知道哪里出问题了
版本号QTAF 5.4.32

执行打包,NameError 异常~

调用测试项目的manage.py:

$ python manage.py dist --version 1.0.0
执行成功后可以看到生成文件在dist目录下:

dist/
foo-1.0.0.tar.gz
本地执行后

Traceback (most recent call last):
  File "setup.py", line 108, in <module>
    install_requires=dict_values(['qtaf']),
NameError: name 'dict_values' is not defined

MacBook Pro,macOS Mojave

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.