#ifndef AISE_TESTING_HPP #define AISE_TESTING_HPP #include "aise/types.hpp" #include #include namespace aise { // ── 测试自动化与验证(SRS-AISE_F-003) ── class TestingModule { public: TestingModule(); // 根据需求生成测试用例集 std::vector generateTestCases(const std::string& req_id, const std::string& code_snapshot); // 执行测试并生成覆盖率报告 struct TestRunResult { bool all_passed; uint32_t total; uint32_t passed; uint32_t failed; std::vector coverage; std::string log_summary; }; TestRunResult execute(const std::vector& cases, const std::string& executable_path); // 需求覆盖率统计 double computeReqCoverage(const std::vector& reqs, const std::vector& cases) const; private: // 模拟静态分析:提取路径 std::vector extractPaths(const std::string& code); }; } // namespace aise #endif // AISE_TESTING_HPP