Hercules:开源测试代理

Hercules:开源测试代理

testzeus-hercules Welcome to Hercules, the world's first open-source testing agent that's here to lift your testing burdens with the strength of a mythological hero. testzeus-hercules 项目地址: https://gitcode.com/gh_mirrors/te/testzeus-hercules

1. 项目介绍

Hercules 是世界上第一个开源测试代理,它可以处理 UI、API、安全性、可访问性和视觉验证,无需编写代码或维护。Hercules 将简单的 Gherkin 步骤转换为完全自动化的端到端测试,无需编码技能。无论是处理 Salesforce 这样的复杂平台,还是在 CI/CD 管道中运行测试,Hercules 都能适应您的需求,并处理细节问题。使用 Hercules,测试变得简单、可靠和高效,帮助各地的团队交付更好的软件。

2. 项目快速启动

安装

首先,确保您的环境中已安装 Python。然后,通过以下命令安装 Hercules:

pip install testzeus-hercules

Hercules 使用 Playwright 与网页交互,因此您需要安装 Playwright 及其依赖项:

playwright install --with-deps

配置

安装完成后,您需要提供一些基本参数来运行 Hercules:

  • --input-file INPUT_FILE:要测试的输入 Gherkin 特性文件的路径。

  • --output-path OUTPUT_PATH:测试结果(JUnit XML 格式)和 HTML 报告的输出目录路径。

  • --test-data-path TEST_DATA_PATH:测试数据目录的路径,Hercules 期望在此路径下存在所有用于特性测试的测试数据。

  • --project-base PROJECT_BASE:项目基本目录的路径。这是一个可选参数;如果您填充了此参数,--input-file--output-path--test-data-path 将不是必需的,Hercules 将假设所有三个文件夹以下列格式存在于项目基本目录中:

    PROJECT_BASE/
    ├── gherkin_files/
    ├── input/
    │   └── test.feature
    ├── log_files/
    ├── output/
    │   ├── test.feature_result.html
    │   └── test.feature_result.xml
    ├── proofs/
    │   └── User_opens_Google_homepage/
    │       ├── network_logs.json
    │       ├── screenshots/
    │       └── videos/
    └── test_data/
    └── test_data.txt
    
  • --llm-model LLM_MODEL:代理使用的 LLM 模型名称(建议使用 gpt-4o,但也可以接受其他模型)。

  • --llm-model-api-key LLM_MODEL_API_KEY:LLM 模型的 API 密钥,格式类似于 sk-proj-k.......

运行

配置好参数后,使用以下命令运行 Hercules:

testzeus-hercules --input-file path/to/your.feature --output-path path/to/output --test-data-path path/to/test_data

3. 应用案例和最佳实践

  • 案例:使用 Hercules 自动化 Salesforce 铅笔创建流程。
  • 最佳实践:编写清晰、简洁的 Gherkin 特性文件,以便 Hercules 可以准确地执行测试。

4. 典型生态项目

Hercules 作为测试自动化工具,可以与多个开源项目集成,例如:

  • CI/CD 工具:如 Jenkins、GitLab CI 等。
  • 测试框架:如 pytest、JUnit 等。
  • Web 自动化工具:如 Selenium、Playwright 等。

通过这些集成,Hercules 可以更好地适应不同的开发环境和需求。

testzeus-hercules Welcome to Hercules, the world's first open-source testing agent that's here to lift your testing burdens with the strength of a mythological hero. testzeus-hercules 项目地址: https://gitcode.com/gh_mirrors/te/testzeus-hercules

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

荣杏姣Samantha

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值