🚀 后端代码生成 Agent - 功能验证报告

Generated on 2026-03-15T12:27:01.382487

总测试数

7

通过

6

失败

1

通过率

85.7%

状态

PARTIAL_SUCCESS

测试详情

_test_single_endpoint_generation

✓ PASSED 耗时:0ms
详情:
  lines_of_code: 88
  generation_time_ms: 1
  file_exists: True
  file_path: /Users/xingzhi/ai/iCodeAgent/output/session_20260315_122346/query_001/backend_agent_test/scripts/../verification_output/test1/src/post_api_v1_users.py

_test_batch_endpoint_generation

✓ PASSED 耗时:0ms
详情:
  total_endpoints: 6
  successful_generations: 6
  total_lines_of_code: 507
  average_time_per_endpoint_ms: 0.09850660959879558

_test_test_generation_quality

✗ FAILED 耗时:0ms
详情:
  test_cases_count: 6
  coverage_estimate: 90.0
  has_success_test: True
  has_error_test: False
  has_schema_test: True
  has_fixture: True
  test_file_path: /Users/xingzhi/ai/iCodeAgent/output/session_20260315_122346/query_001/backend_agent_test/scripts/../verification_output/test3/tests/test_post_api_payments.py

_test_code_syntax_validity

✓ PASSED 耗时:0ms
详情:
  syntax_valid: True
  lines_of_code: 84
  error_message: None

_test_performance

✓ PASSED 耗时:0ms
详情:
  total_endpoints: 10
  average_generation_time_ms: 0.06890296936035156
  min_generation_time_ms: 0.06413459777832031
  max_generation_time_ms: 0.07390975952148438
  total_time_ms: 0.7910728454589844
  throughput_endpoints_per_second: 12641.060880048222

_test_error_handling

✓ PASSED 耗时:0ms
详情:
  error_handled_gracefully: True

_test_integration_workflow

✓ PASSED 耗时:0ms
详情:
  workflow_steps: [{'step': 'API_Design', 'endpoints_count': 3, 'status': 'completed'}, {'step': 'Code_Generation', 'generated_files': 3, 'total_lines': 253, 'status': 'completed'}, {'step': 'Test_Generation', 'generated_tests': 3, 'total_test_cases': 18, 'avg_coverage': 90.0, 'status': 'completed'}, {'step': 'Statistics', 'stats': {'total_generations': 3, 'successful_generations': 3, 'failed_generations': 0, 'success_rate': 100.0, 'total_lines_of_code': 253, 'average_generation_time_ms': 1.0}, 'status': 'completed'}]
  total_endpoints_processed: 3
  code_files_generated: 3
  test_files_generated: 3
  overall_success_rate: 100.0