- CLI + Web 双平台,基于 LLM 的 TDD+DDD 自动化测试生成 - 集成 unified-test-platform 903 个 D-Cloud 用例 + 13 个 Robogo 场景 - Agent 5 步流水线: 扫描 -> DDD -> LLM 生成测试 - 精确回归 + UI 变更检查 - 可视化 HTML 测试报告 - 暗色/亮色主题切换 - 19 个 API 端点 + 6 个 SPA 页面 - 15/15 项 TDD+DDD 合规
30 lines
678 B
Django/Jinja
30 lines
678 B
Django/Jinja
# {{ test_type }} test for {{ context_name }}
|
|
# Generated by TestAgent
|
|
|
|
import pytest
|
|
{% for imp in imports %}
|
|
{{ imp }}
|
|
{% endfor %}
|
|
|
|
|
|
class {{ class_prefix }}{{ file_stem | capitalize }}Tests:
|
|
"""{{ class_docstring }}"""
|
|
|
|
{% for test in test_cases %}
|
|
def test_should_{{ test.expected_behavior }}_when_{{ test.condition }}(self):
|
|
"""{{ test.docstring }}"""
|
|
# Arrange
|
|
{% for line in test.arrange %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
|
|
# Act
|
|
{% for line in test.act %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
|
|
# Assert
|
|
{% for line in test.assert_ %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
{% endfor %} |