Test_Agent/framework/scripts/test_billing.py
jiawei.chen 6f6053ff51 feat: TestAgent 智能测试平台 v1.0
- 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 合规
2026-07-08 11:27:38 +08:00

31 lines
934 B
Python

import requests
import json
import config
url = f"https://cloud-fat.d-robotics.cc/api/dcloudResourceApi/consumptions"
params = {
"page": 1,
"pageSize": 50,
"instanceName": "验证01"
}
headers = {
"Accept": "application/json, text/plain, */*",
"Authorization": config.CLOUD_AUTH_TOKEN,
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36",
}
print(f"Requesting URL: {url}")
resp = requests.get(url, params=params, headers=headers)
print(f"Status Code: {resp.status_code}")
try:
data = resp.json()
print(f"Status in JSON: {data.get('status')}")
print(f"Data content: {data.get('data')}")
items = data.get("data", {}).get("items", [])
for item in items:
print(f"- {item.get('instanceName')}")
except Exception as e:
print(f"Error parsing JSON: {e}")
print(f"Raw Response: {resp.text[:500]}")