Skip to main content

testtools-cli

testtools命令行工具,主要提供脚手架辅助功能

安装

pip install testtools-cli

如何使用

💾testtools-cli install

安装工具开发依赖的相关组件,目前包括:

  • solarctl

✨testtools-cli init

在指定目录(默认当前目录)创建测试工具脚手架内容,当前支持语言:

  • python
  • golang

使用例子:

testtools-cli init
testtools-cli init --workdir /tmp/jagma

测试工具建议使用小写英文名称。

🪄testtools-cli check

检查指定目录(默认当前目录)的脚手架内容还有哪些要修改的。

  • __TODO__: 必须实现的部分

必须实现的部分主要包括用例的加载、执行以及结果的上报

  • __RECOMMANDTODO__: 建议实现的部分

建议实现的部分主要为工具的元数据信息,包括homePage(工具主页)、repository(工具源码地址)、gitPkgUrl以及httpPkgUrl(工具压缩包地址)等

🐞testtools-cli debug

执行加载用例及执行用例并输出工具日志,命令支持参数如下所示:

  • --case-root指定用例库根目录,若不传入则默认为当前目录

  • --target指定加载/执行的用例范围,支持传入多个执行目标,若不传入则默认执行用例库下所有用例。

  • --tool指定开发的工具所在目录,若不传入则默认为当前目录

  • --commands指定构建 TestContainer 时执行的自定义命令,适用于用例执行过程中需要安装额外依赖的场景,支持传入多个命令

开发说明

脚手架内容按照语言统一放到 脚手架目录 下面。模板语言使用Jinja2,只有2条简单规则:

  • 文件内容中的{{name}}会被替换为输入的工具名称
  • 路径中的{{name}}会被替换为输入的工具名称

Metadata

Release files for testtools-cli 0.2.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for testtools-cli 0.2.19
File Size Uploaded Provenance Actions
testtools_cli-0.2.19.tar.gz 87.9 kB Without provenance Details for testtools_cli-0.2.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for testtools-cli 0.2.19
File Interpreter ABI Platform Actions
testtools_cli-0.2.19-py3-none-any.whl Python 3 none any Details for testtools_cli-0.2.19-py3-none-any.whl

Total release size: 155.1 kB

Release files / testtools_cli-0.2.19.tar.gz

Download URL testtools_cli-0.2.19.tar.gz
Size 87.9 kB
Tags Source
SHA-256 checksum
How to use checksums
333e71de6528c61c09ef58a4f3b30dc99ff4c29a3f5bb6320ef6e146c240165c
BLAKE2b-256 checksum
How to use checksums
fee2fb23cb4ed487579e0d608d263cf07004a73d117cba47ee086549ce84d1c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / testtools_cli-0.2.19-py3-none-any.whl

Download URL testtools_cli-0.2.19-py3-none-any.whl
Size 67.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5b5fcab80aaa4499ba422589310f7bee29a6d78d6cf9b115f0bd9a30207c7fd
BLAKE2b-256 checksum
How to use checksums
19d7d930f6f5d06f716b9e26e4f7209447be27554d51025eeb69168f8b12d2c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Security for testtools-cli 0.2.19

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page