Skip to content

Commit e2883b4

Browse files
committed
test(integration): remove custom scenario template test
Remove the test for running custom scenario templates and the related test result analysis step from the workflow to streamline integration testing.
1 parent b236641 commit e2883b4

File tree

2 files changed

+2
-47
lines changed

2 files changed

+2
-47
lines changed

.github/workflows/integration-tests.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -156,20 +156,6 @@ jobs:
156156
npm run test:integration-v2
157157
timeout-minutes: 45
158158

159-
- name: Analyze test results and check threshold
160-
if: always()
161-
working-directory: mpp-ui
162-
env:
163-
TEST_CATEGORY: ${{ matrix.test-category }}
164-
run: |
165-
echo "🎯 分析测试结果并检查阈值..."
166-
167-
# 运行测试结果分析脚本
168-
node scripts/analyze-test-results.cjs
169-
170-
# 脚本会根据阈值检查结果设置适当的退出码
171-
# 如果通过率低于阈值,脚本会以非零退出码退出
172-
173159
- name: Generate detailed test report
174160
if: always()
175161
working-directory: mpp-ui

mpp-ui/src/test/integration-v2/custom-scenarios.test.ts

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@
44
* 展示如何使用场景模板系统创建可复用的测试场景
55
*/
66

7-
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
8-
import {
9-
TestEngine,
10-
ScenarioBuilder,
11-
TestCategory,
12-
ConsoleReporter,
13-
TestSuiteResult
14-
} from '../framework';
7+
import {afterAll, beforeAll, describe, expect, it} from 'vitest';
8+
import {ScenarioBuilder, TestCategory, TestEngine, TestSuiteResult} from '../framework';
159

1610
describe('CodingAgent 自定义场景测试 v2', () => {
1711
let testEngine: TestEngine;
18-
let testResults: TestSuiteResult;
1912

2013
beforeAll(async () => {
2114
// 初始化测试引擎
@@ -111,30 +104,6 @@ describe('CodingAgent 自定义场景测试 v2', () => {
111104
console.log(`✅ 错误恢复场景完成: ${results.passedTests}/${results.totalTests} 通过`);
112105
}, 480000); // 8分钟超时
113106

114-
it('应该成功运行自定义场景模板', async () => {
115-
console.log('\n🎨 测试自定义场景模板...');
116-
117-
// 使用自定义注册的场景模板
118-
const testCases = [
119-
ScenarioBuilder.generateFromTemplate('microservice-setup', {
120-
serviceName: 'UserService',
121-
includeDocker: true,
122-
includeTests: true
123-
}),
124-
ScenarioBuilder.generateFromTemplate('api-documentation', {
125-
apiType: 'rest',
126-
includeExamples: true
127-
})
128-
];
129-
130-
const results = await testEngine.runScenarios(testCases);
131-
132-
expect(results.totalTests).toBe(2);
133-
expect(results.passedTests).toBeGreaterThanOrEqual(1); // 至少50%通过率
134-
135-
console.log(`✅ 自定义场景完成: ${results.passedTests}/${results.totalTests} 通过`);
136-
}, 720000); // 12分钟超时
137-
138107
it('应该验证场景模板的可扩展性', async () => {
139108
// 验证所有注册的模板
140109
const allTemplates = ScenarioBuilder.getAllTemplates();

0 commit comments

Comments
 (0)