3 Star 0 Fork 1

Bianbu Linux/factorytest

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

工厂测试源码。

  • 支持图形界面

依赖

  • Python3
  • unittest
  • PyQt5

源码目录

├── cricket    # Cricket is a graphical tool that helps you run your test suites.
├── gui-main
├── res        # test case resources
├─── tests     # factory test case
│   ├── auto   # auto test case
│   └── manual # manual test case
└── utils      # common files

测试项

测试项有自动测试项和手动测试项两类。自动测试项无需人工干预,自动判定测试是否通过。手动测试需要人工参与,判断是否通过。

添加测试项规则:

  • 自动测试项和手动测试项分别添加到tests/autotests/manual目录
  • 每个模块一个文件,以test_开头,可以加上序号规定加载顺序,例如test_01_,文件里定义一个测试类,继承unittest.TestCase
  • 测试项为类的方法,测试方法的名称必须以test_开头
  • 类里定义一个字典LANGUAGES,用于支持多国语音

注意事项:

  • 不要在测试方法里调用os._exit()sys.exit()QApplication quit()等方法,会导致测试中止,建议创建线程或子进程。

多国语言

相关文件:

  • cricket/cricket/lang.py
  • cricket/cricket/languages.json

语言:

  • zh:中文
  • en:英文

默认语言:中文,可以通过cricket/cricket/lang.py的_current_lang修改。

TODO

  • 支持命令行
BSD 3-Clause License Copyright (c) 2024, SpacemiT Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

factory test app. bl-v1.0.y branch for BPI-F3, k1-muse-book branch for MUSE Book. 展开 收起
README
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bianbu-linux/factorytest.git
git@gitee.com:bianbu-linux/factorytest.git
bianbu-linux
factorytest
factorytest
k1-bl-v2.2.y

搜索帮助