@zeyue0329/xiaoma-cli 1.0.22 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,477 @@
1
+ # Project Integration Testing - 项目集成测试
2
+
3
+ ## Task Overview
4
+
5
+ **任务名称**: 项目集成测试
6
+ **任务ID**: project-integration-testing
7
+ **分类**: 质量保证与集成验证
8
+ **复杂度**: ⭐⭐⭐⭐⭐
9
+
10
+ ## Task Description
11
+
12
+ 当所有用户故事开发完成后,执行项目级别的综合集成测试,包括跨模块集成测试、端到端业务流程验证、性能测试、安全测试,确保整个系统的完整性和可交付性。
13
+
14
+ ## Input Requirements
15
+
16
+ ### 必需输入
17
+
18
+ 1. **所有已完成的用户故事**
19
+ - 状态为 "Done" 的用户故事
20
+ - 包含完整的实现代码和单元测试
21
+
22
+ 2. **系统集成配置** (integration_config.yaml)
23
+ - 各模块接口定义
24
+ - 集成测试环境配置
25
+
26
+ 3. **业务流程定义** (business_processes.yaml)
27
+ - 端到端业务流程规范
28
+ - 用户旅程定义
29
+
30
+ ### 可选输入
31
+
32
+ 1. **性能基准** (performance_benchmarks.yaml)
33
+ - 性能要求和基准指标
34
+ - 负载测试配置
35
+
36
+ 2. **安全测试规范** (security_test_specs.yaml)
37
+ - 安全测试用例
38
+ - 漏洞扫描配置
39
+
40
+ ## Processing Steps
41
+
42
+ ### 第1步: 集成测试环境准备
43
+
44
+ ```yaml
45
+ environment_preparation:
46
+ infrastructure_setup:
47
+ - database_deployment: 部署完整数据库实例
48
+ - service_deployment: 部署所有微服务
49
+ - middleware_configuration: 配置中间件(Redis, MQ等)
50
+ - monitoring_setup: 设置监控和日志系统
51
+
52
+ data_preparation:
53
+ - test_data_generation: 生成测试数据集
54
+ - reference_data_loading: 加载参考数据
55
+ - user_account_setup: 设置测试用户账户
56
+ - permission_configuration: 配置权限和角色
57
+
58
+ configuration_validation:
59
+ - service_connectivity_check: 服务连接性检查
60
+ - database_schema_validation: 数据库结构验证
61
+ - api_endpoint_accessibility: API端点可访问性
62
+ - authentication_validation: 认证系统验证
63
+ ```
64
+
65
+ ### 第2步: 跨模块集成测试
66
+
67
+ ```yaml
68
+ cross_module_integration:
69
+ api_integration_testing:
70
+ test_categories:
71
+ - service_to_service_communication: 服务间通信测试
72
+ - data_consistency_across_services: 跨服务数据一致性
73
+ - transaction_boundary_testing: 事务边界测试
74
+ - error_propagation_testing: 错误传播测试
75
+
76
+ test_scenarios:
77
+ user_management_integration:
78
+ - user_registration_to_profile_creation: 用户注册到个人资料创建
79
+ - authentication_to_authorization: 认证到授权流程
80
+ - user_data_synchronization: 用户数据同步
81
+
82
+ data_flow_integration:
83
+ - data_creation_to_storage: 数据创建到存储
84
+ - data_query_across_modules: 跨模块数据查询
85
+ - data_update_propagation: 数据更新传播
86
+
87
+ business_process_integration:
88
+ - workflow_execution: 工作流执行
89
+ - business_rule_enforcement: 业务规则执行
90
+ - state_transition_management: 状态转换管理
91
+ ```
92
+
93
+ ### 第3步: 端到端业务流程测试
94
+
95
+ ```yaml
96
+ end_to_end_testing:
97
+ user_journey_testing:
98
+ complete_user_workflows:
99
+ - new_user_onboarding: 新用户入职完整流程
100
+ - core_business_operations: 核心业务操作流程
101
+ - user_account_management: 用户账户管理流程
102
+ - data_lifecycle_management: 数据生命周期管理
103
+
104
+ test_execution_approach:
105
+ - automated_ui_testing: 自动化UI测试
106
+ - api_sequence_testing: API序列测试
107
+ - database_state_validation: 数据库状态验证
108
+ - business_outcome_verification: 业务结果验证
109
+
110
+ business_scenario_validation:
111
+ critical_business_flows:
112
+ - primary_user_scenarios: 主要用户场景
113
+ - exception_handling_flows: 异常处理流程
114
+ - edge_case_scenarios: 边界情况场景
115
+ - integration_failure_recovery: 集成故障恢复
116
+
117
+ validation_criteria:
118
+ - functional_correctness: 功能正确性
119
+ - data_integrity: 数据完整性
120
+ - business_rule_compliance: 业务规则合规性
121
+ - user_experience_quality: 用户体验质量
122
+ ```
123
+
124
+ ### 第4步: 性能集成测试
125
+
126
+ ```yaml
127
+ performance_integration:
128
+ performance_test_types:
129
+ load_testing:
130
+ - baseline_load_testing: 基准负载测试
131
+ - peak_load_simulation: 峰值负载模拟
132
+ - sustained_load_testing: 持续负载测试
133
+
134
+ stress_testing:
135
+ - system_breaking_point: 系统断点测试
136
+ - resource_exhaustion_scenarios: 资源耗尽场景
137
+ - recovery_capability_testing: 恢复能力测试
138
+
139
+ scalability_testing:
140
+ - horizontal_scaling_validation: 水平扩展验证
141
+ - database_performance_scaling: 数据库性能扩展
142
+ - concurrent_user_scaling: 并发用户扩展
143
+
144
+ performance_metrics:
145
+ response_time_metrics:
146
+ - api_response_times: API响应时间
147
+ - database_query_performance: 数据库查询性能
148
+ - end_to_end_transaction_time: 端到端事务时间
149
+
150
+ throughput_metrics:
151
+ - requests_per_second: 每秒请求数
152
+ - transactions_per_minute: 每分钟事务数
153
+ - data_processing_throughput: 数据处理吞吐量
154
+
155
+ resource_utilization:
156
+ - cpu_utilization: CPU利用率
157
+ - memory_consumption: 内存消耗
158
+ - database_connection_usage: 数据库连接使用
159
+ ```
160
+
161
+ ### 第5步: 安全集成测试
162
+
163
+ ```yaml
164
+ security_integration:
165
+ security_test_categories:
166
+ authentication_security:
167
+ - login_security_validation: 登录安全验证
168
+ - session_management_testing: 会话管理测试
169
+ - token_security_validation: 令牌安全验证
170
+ - multi_factor_authentication: 多因素认证测试
171
+
172
+ authorization_security:
173
+ - role_based_access_control: 基于角色的访问控制
174
+ - resource_permission_validation: 资源权限验证
175
+ - privilege_escalation_prevention: 权限升级防护
176
+
177
+ data_security:
178
+ - data_encryption_validation: 数据加密验证
179
+ - sensitive_data_protection: 敏感数据保护
180
+ - data_masking_verification: 数据脱敏验证
181
+ - audit_trail_completeness: 审计跟踪完整性
182
+
183
+ api_security:
184
+ - input_validation_testing: 输入验证测试
185
+ - sql_injection_prevention: SQL注入防护
186
+ - cross_site_scripting_protection: XSS防护
187
+ - api_rate_limiting: API频率限制
188
+
189
+ penetration_testing:
190
+ automated_vulnerability_scanning:
191
+ - dependency_vulnerability_check: 依赖漏洞检查
192
+ - configuration_security_scan: 配置安全扫描
193
+ - network_security_analysis: 网络安全分析
194
+
195
+ manual_security_testing:
196
+ - business_logic_security: 业务逻辑安全
197
+ - workflow_security_validation: 工作流安全验证
198
+ - data_flow_security_analysis: 数据流安全分析
199
+ ```
200
+
201
+ ### 第6步: 系统可靠性测试
202
+
203
+ ```yaml
204
+ reliability_testing:
205
+ fault_tolerance_testing:
206
+ service_failure_scenarios:
207
+ - single_service_failure: 单一服务故障
208
+ - database_connection_failure: 数据库连接故障
209
+ - network_partition_scenarios: 网络分区场景
210
+ - external_service_unavailability: 外部服务不可用
211
+
212
+ recovery_testing:
213
+ - automatic_failover_validation: 自动故障转移验证
214
+ - data_recovery_procedures: 数据恢复程序
215
+ - service_restart_behavior: 服务重启行为
216
+ - system_state_consistency: 系统状态一致性
217
+
218
+ disaster_recovery_testing:
219
+ backup_and_restore:
220
+ - database_backup_validation: 数据库备份验证
221
+ - full_system_restore: 完整系统恢复
222
+ - incremental_backup_testing: 增量备份测试
223
+
224
+ business_continuity:
225
+ - minimal_service_operation: 最小服务运行
226
+ - degraded_mode_functionality: 降级模式功能
227
+ - recovery_time_objectives: 恢复时间目标
228
+ ```
229
+
230
+ ## Test Automation Framework
231
+
232
+ ### 自动化测试执行
233
+
234
+ ```yaml
235
+ automation_framework:
236
+ test_execution_engine:
237
+ parallel_test_execution:
238
+ - test_suite_parallelization: 测试套件并行化
239
+ - resource_isolated_testing: 资源隔离测试
240
+ - concurrent_environment_management: 并发环境管理
241
+
242
+ test_data_management:
243
+ - dynamic_test_data_generation: 动态测试数据生成
244
+ - test_data_cleanup: 测试数据清理
245
+ - data_state_isolation: 数据状态隔离
246
+
247
+ result_aggregation:
248
+ - test_result_consolidation: 测试结果合并
249
+ - cross_test_correlation: 跨测试关联分析
250
+ - failure_root_cause_analysis: 故障根因分析
251
+
252
+ continuous_integration:
253
+ automated_triggers:
254
+ - story_completion_trigger: 故事完成触发
255
+ - dependency_satisfaction_trigger: 依赖满足触发
256
+ - scheduled_regression_testing: 定期回归测试
257
+
258
+ quality_gates:
259
+ - integration_test_pass_rate: 集成测试通过率(>95%)
260
+ - performance_benchmark_compliance: 性能基准合规性
261
+ - security_vulnerability_threshold: 安全漏洞阈值(零高危)
262
+ ```
263
+
264
+ ### 测试报告生成
265
+
266
+ ```yaml
267
+ reporting_system:
268
+ comprehensive_test_reports:
269
+ executive_summary:
270
+ - overall_system_health: 整体系统健康度
271
+ - critical_issues_summary: 关键问题摘要
272
+ - recommendation_priorities: 建议优先级
273
+
274
+ detailed_analysis:
275
+ - module_integration_status: 模块集成状态
276
+ - performance_analysis_report: 性能分析报告
277
+ - security_assessment_report: 安全评估报告
278
+ - reliability_validation_report: 可靠性验证报告
279
+
280
+ actionable_insights:
281
+ - improvement_recommendations: 改进建议
282
+ - risk_mitigation_strategies: 风险缓解策略
283
+ - deployment_readiness_assessment: 部署就绪评估
284
+ ```
285
+
286
+ ## Quality Gates and Validation
287
+
288
+ ### 集成测试质量门控
289
+
290
+ ```yaml
291
+ quality_gates:
292
+ functional_quality_gate:
293
+ criteria:
294
+ - integration_test_pass_rate: ≥98%
295
+ - end_to_end_scenario_success: 100%
296
+ - critical_business_flow_validation: 100%
297
+ - data_consistency_validation: 100%
298
+
299
+ validation_process:
300
+ - automated_test_execution: 自动化测试执行
301
+ - manual_validation_checkpoint: 人工验证检查点
302
+ - business_stakeholder_approval: 业务干系人审批
303
+
304
+ performance_quality_gate:
305
+ criteria:
306
+ - response_time_sla_compliance: 满足响应时间SLA
307
+ - throughput_benchmark_achievement: 达到吞吐量基准
308
+ - resource_utilization_efficiency: 资源利用率效率
309
+ - scalability_requirement_satisfaction: 满足扩展性要求
310
+
311
+ security_quality_gate:
312
+ criteria:
313
+ - zero_high_severity_vulnerabilities: 零高危漏洞
314
+ - authentication_security_validation: 认证安全验证通过
315
+ - data_protection_compliance: 数据保护合规性
316
+ - access_control_effectiveness: 访问控制有效性
317
+ ```
318
+
319
+ ### 交付就绪评估
320
+
321
+ ```yaml
322
+ delivery_readiness:
323
+ technical_readiness:
324
+ code_quality_metrics:
325
+ - integration_test_coverage: ≥90%
326
+ - code_quality_score: ≥8.5/10
327
+ - technical_debt_ratio: ≤5%
328
+
329
+ system_stability:
330
+ - uptime_requirement: ≥99.5%
331
+ - error_rate_threshold: ≤0.1%
332
+ - recovery_time_objective: ≤15分钟
333
+
334
+ business_readiness:
335
+ functional_completeness:
336
+ - requirements_coverage: 100%
337
+ - acceptance_criteria_satisfaction: 100%
338
+ - user_journey_validation: 100%
339
+
340
+ operational_readiness:
341
+ - deployment_procedures: 已验证
342
+ - monitoring_systems: 已配置
343
+ - support_documentation: 已完成
344
+ ```
345
+
346
+ ## Output Generation
347
+
348
+ ### 集成测试报告
349
+
350
+ ```yaml
351
+ # integration_test_report.yaml
352
+ test_report:
353
+ executive_summary:
354
+ overall_status: 'PASSED'
355
+ system_readiness: 'READY_FOR_DEPLOYMENT'
356
+ critical_issues: 0
357
+ total_test_cases: 2847
358
+ pass_rate: 98.7%
359
+
360
+ module_integration_results:
361
+ user_management_module:
362
+ status: 'PASSED'
363
+ test_cases: 456
364
+ pass_rate: 99.1%
365
+ critical_issues: 0
366
+
367
+ data_management_module:
368
+ status: 'PASSED'
369
+ test_cases: 623
370
+ pass_rate: 98.9%
371
+ critical_issues: 0
372
+
373
+ performance_results:
374
+ load_testing:
375
+ baseline_load: 'PASSED'
376
+ peak_load: 'PASSED'
377
+ sustained_load: 'PASSED'
378
+
379
+ response_time_analysis:
380
+ average_api_response: '245ms'
381
+ p95_response_time: '680ms'
382
+ p99_response_time: '1.2s'
383
+
384
+ security_assessment:
385
+ vulnerability_scan: 'PASSED'
386
+ penetration_test: 'PASSED'
387
+ compliance_check: 'PASSED'
388
+ high_severity_issues: 0
389
+
390
+ recommendations:
391
+ - '优化数据库查询性能,减少p99响应时间'
392
+ - '增加API监控告警机制'
393
+ - '完善错误处理和用户友好提示'
394
+ ```
395
+
396
+ ### 交付清单
397
+
398
+ ```yaml
399
+ # delivery_checklist.yaml
400
+ delivery_package:
401
+ code_deliverables:
402
+ - source_code: '完整源代码包'
403
+ - build_artifacts: '构建产物'
404
+ - database_scripts: '数据库部署脚本'
405
+ - configuration_files: '配置文件模板'
406
+
407
+ documentation:
408
+ - api_documentation: 'API接口文档'
409
+ - deployment_guide: '部署指南'
410
+ - user_manual: '用户使用手册'
411
+ - maintenance_guide: '维护运营指南'
412
+
413
+ test_artifacts:
414
+ - test_suites: '完整测试套件'
415
+ - test_data: '测试数据集'
416
+ - performance_benchmarks: '性能基准报告'
417
+ - security_audit_report: '安全审计报告'
418
+
419
+ operational_requirements:
420
+ - infrastructure_specifications: '基础设施规格'
421
+ - monitoring_configuration: '监控配置'
422
+ - backup_procedures: '备份程序'
423
+ - disaster_recovery_plan: '灾难恢复计划'
424
+ ```
425
+
426
+ ## Integration with Full Requirement Orchestrator
427
+
428
+ ### 集成点配置
429
+
430
+ ```yaml
431
+ orchestrator_integration:
432
+ trigger_conditions:
433
+ all_stories_completed: '所有用户故事状态为Done'
434
+ individual_story_tests_passed: '所有故事单元测试通过'
435
+ dependency_integration_ready: '依赖集成就绪'
436
+
437
+ execution_command: '*execute-project-integration'
438
+
439
+ success_criteria:
440
+ integration_tests_passed: '集成测试100%通过'
441
+ performance_benchmarks_met: '性能基准达标'
442
+ security_validation_complete: '安全验证完成'
443
+
444
+ failure_handling:
445
+ rollback_strategy: '回滚到最后稳定版本'
446
+ issue_triage: '问题分级和分配'
447
+ remediation_planning: '修复计划制定'
448
+ ```
449
+
450
+ ## Usage Examples
451
+
452
+ ### 执行项目集成测试
453
+
454
+ ```bash
455
+ # 在全需求编排器中执行
456
+ *agent full-requirement-orchestrator
457
+ *execute-project-integration
458
+
459
+ # 查看集成测试状态
460
+ *monitor-integration-progress
461
+
462
+ # 生成交付报告
463
+ *generate-project-deliverables
464
+ ```
465
+
466
+ ### 故障处理
467
+
468
+ ```bash
469
+ # 处理集成测试失败
470
+ *handle-integration-failure
471
+
472
+ # 执行部分重测
473
+ *retry-failed-integration-tests
474
+
475
+ # 生成问题分析报告
476
+ *analyze-integration-issues
477
+ ```
@@ -0,0 +1,111 @@
1
+ <!-- Powered by XIAOMA™ Core -->
2
+ <!-- Maven POM配置模板 - Lombok最佳实践 -->
3
+ <!-- 基于首周期经验优化,解决编译问题 -->
4
+
5
+ <project>
6
+ <!-- 属性配置 -->
7
+ <properties>
8
+ <java.version>17</java.version>
9
+ <maven.compiler.source>17</maven.compiler.source>
10
+ <maven.compiler.target>17</maven.compiler.target>
11
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12
+ <lombok.version>1.18.34</lombok.version>
13
+ <spring-boot.version>2.7.18</spring-boot.version>
14
+ </properties>
15
+
16
+ <!-- 依赖配置 -->
17
+ <dependencies>
18
+ <!-- Lombok依赖(关键配置) -->
19
+ <dependency>
20
+ <groupId>org.projectlombok</groupId>
21
+ <artifactId>lombok</artifactId>
22
+ <version>${lombok.version}</version>
23
+ <scope>provided</scope>
24
+ </dependency>
25
+ </dependencies>
26
+
27
+ <!-- 构建配置(关键:解决Lombok编译问题) -->
28
+ <build>
29
+ <plugins>
30
+ <!-- Maven编译器插件 - 必须配置注解处理器路径 -->
31
+ <plugin>
32
+ <groupId>org.apache.maven.plugins</groupId>
33
+ <artifactId>maven-compiler-plugin</artifactId>
34
+ <version>3.11.0</version>
35
+ <configuration>
36
+ <source>${java.version}</source>
37
+ <target>${java.version}</target>
38
+ <encoding>${project.build.sourceEncoding}</encoding>
39
+ <!-- 关键配置:Lombok注解处理器路径 -->
40
+ <annotationProcessorPaths>
41
+ <path>
42
+ <groupId>org.projectlombok</groupId>
43
+ <artifactId>lombok</artifactId>
44
+ <version>${lombok.version}</version>
45
+ </path>
46
+ <!-- 如果使用MyBatis Plus,添加其注解处理器 -->
47
+ <path>
48
+ <groupId>com.baomidou</groupId>
49
+ <artifactId>mybatis-plus-processor</artifactId>
50
+ <version>3.5.3.1</version>
51
+ </path>
52
+ </annotationProcessorPaths>
53
+ <compilerArgs>
54
+ <arg>-parameters</arg>
55
+ </compilerArgs>
56
+ </configuration>
57
+ </plugin>
58
+
59
+ <!-- Surefire插件 - 测试配置 -->
60
+ <plugin>
61
+ <groupId>org.apache.maven.plugins</groupId>
62
+ <artifactId>maven-surefire-plugin</artifactId>
63
+ <version>2.22.2</version>
64
+ <configuration>
65
+ <skipTests>false</skipTests>
66
+ <testFailureIgnore>false</testFailureIgnore>
67
+ <includes>
68
+ <include>**/*Test.java</include>
69
+ <include>**/*Tests.java</include>
70
+ </includes>
71
+ </configuration>
72
+ </plugin>
73
+
74
+ <!-- Failsafe插件 - 集成测试配置 -->
75
+ <plugin>
76
+ <groupId>org.apache.maven.plugins</groupId>
77
+ <artifactId>maven-failsafe-plugin</artifactId>
78
+ <version>2.22.2</version>
79
+ <configuration>
80
+ <includes>
81
+ <include>**/*IT.java</include>
82
+ <include>**/*IntegrationTest.java</include>
83
+ </includes>
84
+ </configuration>
85
+ <executions>
86
+ <execution>
87
+ <goals>
88
+ <goal>integration-test</goal>
89
+ <goal>verify</goal>
90
+ </goals>
91
+ </execution>
92
+ </executions>
93
+ </plugin>
94
+ </plugins>
95
+ </build>
96
+
97
+ <!-- 配置说明 -->
98
+ <!--
99
+ 关键点:
100
+ 1. Lombok版本使用1.18.34(兼容Java 17)
101
+ 2. 必须配置annotationProcessorPaths
102
+ 3. 编译器参数添加-parameters
103
+ 4. scope设置为provided
104
+ 5. 测试插件正确配置
105
+
106
+ 常见问题解决:
107
+ - 编译错误:检查annotationProcessorPaths配置
108
+ - IDE不识别:安装Lombok插件并启用注解处理
109
+ - 版本冲突:统一使用属性管理版本
110
+ -->
111
+ </project>