kiro-agent-team 1.0.0
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.
- package/.kiro/README.md +228 -0
- package/.kiro/agents/backend-engineer.json +6 -0
- package/.kiro/agents/backend-engineer.md +643 -0
- package/.kiro/agents/database-specialist.json +6 -0
- package/.kiro/agents/database-specialist.md +390 -0
- package/.kiro/agents/development-logger.json +6 -0
- package/.kiro/agents/development-logger.md +265 -0
- package/.kiro/agents/devops-engineer.json +6 -0
- package/.kiro/agents/devops-engineer.md +287 -0
- package/.kiro/agents/frontend-architect.json +6 -0
- package/.kiro/agents/frontend-architect.md +1032 -0
- package/.kiro/agents/hooks/backend-engineer-hooks.yaml +540 -0
- package/.kiro/agents/hooks/database-specialist-hooks.yaml +488 -0
- package/.kiro/agents/hooks/development-logger-hooks.yaml +361 -0
- package/.kiro/agents/hooks/devops-engineer-hooks.yaml +345 -0
- package/.kiro/agents/hooks/frontend-architect-hooks.yaml +521 -0
- package/.kiro/agents/hooks/project-manager-hooks.yaml +513 -0
- package/.kiro/agents/hooks/security-specialist-hooks.yaml +358 -0
- package/.kiro/agents/hooks/test-orchestrator-hooks.yaml +380 -0
- package/.kiro/agents/hooks/ui-ux-designer-hooks.yaml +353 -0
- package/.kiro/agents/project-manager.json +6 -0
- package/.kiro/agents/project-manager.md +344 -0
- package/.kiro/agents/prompts/backend-engineer-system.md +815 -0
- package/.kiro/agents/prompts/database-specialist-system.md +332 -0
- package/.kiro/agents/prompts/development-logger-system.md +232 -0
- package/.kiro/agents/prompts/devops-engineer-system.md +260 -0
- package/.kiro/agents/prompts/frontend-architect-system.md +305 -0
- package/.kiro/agents/prompts/project-manager-system.md +285 -0
- package/.kiro/agents/prompts/security-specialist-system.md +231 -0
- package/.kiro/agents/prompts/test-orchestrator-system.md +214 -0
- package/.kiro/agents/prompts/ui-ux-designer-system.md +270 -0
- package/.kiro/agents/security-specialist.json +6 -0
- package/.kiro/agents/security-specialist.md +277 -0
- package/.kiro/agents/test-orchestrator.json +6 -0
- package/.kiro/agents/test-orchestrator.md +266 -0
- package/.kiro/agents/ui-ux-designer.json +6 -0
- package/.kiro/agents/ui-ux-designer.md +284 -0
- package/.kiro/devlog/00-START-HERE.md +444 -0
- package/.kiro/devlog/COMPLETE-WORKFLOW.md +553 -0
- package/.kiro/devlog/DEVLOG-INTEGRATION.md +413 -0
- package/.kiro/devlog/DEVLOG-PROCESS-FLOWS.md +484 -0
- package/.kiro/devlog/DEVLOG-QUICK-REF.md +299 -0
- package/.kiro/devlog/DEVLOG.md +22 -0
- package/.kiro/devlog/IMPLEMENTATION-COMPLETE.txt +434 -0
- package/.kiro/devlog/IMPLEMENTATION-SUMMARY.md +358 -0
- package/.kiro/devlog/README.md +363 -0
- package/.kiro/devlog/devlog-update.bat +136 -0
- package/.kiro/devlog/devlog-update.sh +275 -0
- package/.kiro/devlog/feature-completion-hook.bat +78 -0
- package/.kiro/devlog/feature-completion-hook.sh +84 -0
- package/.kiro/documentation/cli.md +31 -0
- package/.kiro/documentation/docs_cli.md +41 -0
- package/.kiro/documentation/docs_cli_authentication.md +43 -0
- package/.kiro/documentation/docs_cli_autocomplete.md +132 -0
- package/.kiro/documentation/docs_cli_billing.md +31 -0
- package/.kiro/documentation/docs_cli_billing_contact-support.md +43 -0
- package/.kiro/documentation/docs_cli_billing_managing-taxes.md +67 -0
- package/.kiro/documentation/docs_cli_billing_related-questions.md +49 -0
- package/.kiro/documentation/docs_cli_billing_subscription-portal.md +31 -0
- package/.kiro/documentation/docs_cli_chat.md +84 -0
- package/.kiro/documentation/docs_cli_chat_configuration.md +40 -0
- package/.kiro/documentation/docs_cli_chat_context.md +258 -0
- package/.kiro/documentation/docs_cli_chat_git-aware-selection.md +41 -0
- package/.kiro/documentation/docs_cli_chat_images.md +53 -0
- package/.kiro/documentation/docs_cli_chat_manage-prompts.md +216 -0
- package/.kiro/documentation/docs_cli_chat_model-selection.md +153 -0
- package/.kiro/documentation/docs_cli_chat_permissions.md +68 -0
- package/.kiro/documentation/docs_cli_chat_planning-agent.md +230 -0
- package/.kiro/documentation/docs_cli_chat_responding.md +123 -0
- package/.kiro/documentation/docs_cli_chat_security.md +87 -0
- package/.kiro/documentation/docs_cli_chat_subagents.md +77 -0
- package/.kiro/documentation/docs_cli_code-intelligence.md +251 -0
- package/.kiro/documentation/docs_cli_custom-agents.md +37 -0
- package/.kiro/documentation/docs_cli_custom-agents_configuration-reference.md +941 -0
- package/.kiro/documentation/docs_cli_custom-agents_creating.md +93 -0
- package/.kiro/documentation/docs_cli_custom-agents_examples.md +360 -0
- package/.kiro/documentation/docs_cli_custom-agents_troubleshooting.md +180 -0
- package/.kiro/documentation/docs_cli_enterprise_billing.md +33 -0
- package/.kiro/documentation/docs_cli_enterprise_concepts.md +34 -0
- package/.kiro/documentation/docs_cli_enterprise_getting-started.md +19 -0
- package/.kiro/documentation/docs_cli_enterprise_iam.md +251 -0
- package/.kiro/documentation/docs_cli_enterprise_monitor-and-track.md +15 -0
- package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_dashboard.md +62 -0
- package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_prompt-logging.md +165 -0
- package/.kiro/documentation/docs_cli_enterprise_monitor-and-track_user-activity.md +123 -0
- package/.kiro/documentation/docs_cli_enterprise_settings.md +15 -0
- package/.kiro/documentation/docs_cli_enterprise_subscribe.md +36 -0
- package/.kiro/documentation/docs_cli_enterprise_subscription-management.md +55 -0
- package/.kiro/documentation/docs_cli_enterprise_supported-regions.md +39 -0
- package/.kiro/documentation/docs_cli_experimental.md +282 -0
- package/.kiro/documentation/docs_cli_experimental_checkpointing.md +439 -0
- package/.kiro/documentation/docs_cli_experimental_delegate.md +422 -0
- package/.kiro/documentation/docs_cli_experimental_knowledge-management.md +449 -0
- package/.kiro/documentation/docs_cli_experimental_tangent-mode.md +357 -0
- package/.kiro/documentation/docs_cli_experimental_thinking.md +331 -0
- package/.kiro/documentation/docs_cli_experimental_todo-lists.md +385 -0
- package/.kiro/documentation/docs_cli_hooks.md +207 -0
- package/.kiro/documentation/docs_cli_installation.md +235 -0
- package/.kiro/documentation/docs_cli_mcp.md +106 -0
- package/.kiro/documentation/docs_cli_mcp_configuration.md +294 -0
- package/.kiro/documentation/docs_cli_mcp_examples.md +273 -0
- package/.kiro/documentation/docs_cli_mcp_governance.md +436 -0
- package/.kiro/documentation/docs_cli_mcp_security.md +77 -0
- package/.kiro/documentation/docs_cli_migrating-from-q.md +129 -0
- package/.kiro/documentation/docs_cli_privacy-and-security.md +83 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_compliance-validation.md +17 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_data-protection.md +104 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_firewalls.md +26 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_infrastructure-security.md +10 -0
- package/.kiro/documentation/docs_cli_privacy-and-security_vpc-endpoints.md +41 -0
- package/.kiro/documentation/docs_cli_reference_built-in-tools.md +624 -0
- package/.kiro/documentation/docs_cli_reference_cli-commands.md +689 -0
- package/.kiro/documentation/docs_cli_reference_settings.md +294 -0
- package/.kiro/documentation/docs_cli_reference_slash-commands.md +559 -0
- package/.kiro/documentation/docs_cli_steering.md +84 -0
- package/.kiro/guides/AGENT_WORKFLOW_GUIDE.md +294 -0
- package/.kiro/guides/DEVLOG.md +882 -0
- package/.kiro/guides/IMPLEMENTATION_EXAMPLES.md +611 -0
- package/.kiro/guides/PIV Loop.md +122 -0
- package/.kiro/guides/PIV Loop.png +0 -0
- package/.kiro/guides/PIVLoop.png +0 -0
- package/.kiro/guides/QUICK_REFERENCE.md +202 -0
- package/.kiro/guides/README.md +149 -0
- package/.kiro/guides/advanced-patterns.md +514 -0
- package/.kiro/guides/agent-coordination.md +434 -0
- package/.kiro/guides/core-workflows.md +409 -0
- package/.kiro/guides/emergency-procedures.md +414 -0
- package/.kiro/guides/project-evaluation.md +534 -0
- package/.kiro/guides/quality-assurance.md +431 -0
- package/.kiro/guides/quick-start.md +235 -0
- package/.kiro/guides/troubleshooting.md +575 -0
- package/.kiro/guides/walkthroughs.md +711 -0
- package/.kiro/prompts/add-to-devlog.md +263 -0
- package/.kiro/prompts/code-review-fix.md +18 -0
- package/.kiro/prompts/code-review-hackathon.md +167 -0
- package/.kiro/prompts/code-review-security.md +454 -0
- package/.kiro/prompts/code-review.md +113 -0
- package/.kiro/prompts/create-prd.md +151 -0
- package/.kiro/prompts/execute-backend.md +257 -0
- package/.kiro/prompts/execute-frontend.md +438 -0
- package/.kiro/prompts/execute-logging.md +491 -0
- package/.kiro/prompts/execute-security.md +482 -0
- package/.kiro/prompts/execute-testing.md +528 -0
- package/.kiro/prompts/execute.md +101 -0
- package/.kiro/prompts/execution-report.md +72 -0
- package/.kiro/prompts/implement-fix.md +228 -0
- package/.kiro/prompts/plan-feature.md +433 -0
- package/.kiro/prompts/prime.md +73 -0
- package/.kiro/prompts/quality-metrics.md +622 -0
- package/.kiro/prompts/quickstart.md +318 -0
- package/.kiro/prompts/rca.md +220 -0
- package/.kiro/prompts/system-review.md +189 -0
- package/README.md +32 -0
- package/bin/cli.js +97 -0
- package/package.json +33 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
# Execute: Testing Implementation
|
|
2
|
+
|
|
3
|
+
## Testing-Specific Implementation Framework
|
|
4
|
+
|
|
5
|
+
This specialized execution framework is optimized for testing and quality assurance tasks, focusing on comprehensive test coverage, quality validation, and systematic testing strategies.
|
|
6
|
+
|
|
7
|
+
## Testing Implementation Process
|
|
8
|
+
|
|
9
|
+
### Phase 1: Testing Requirements Analysis
|
|
10
|
+
**Testing-Specific Analysis:**
|
|
11
|
+
- Test coverage requirements and quality standards
|
|
12
|
+
- Testing scope and strategy definition
|
|
13
|
+
- Performance and reliability testing needs
|
|
14
|
+
- Accessibility and compliance testing requirements
|
|
15
|
+
- Risk assessment and critical path identification
|
|
16
|
+
- Testing tool and framework selection
|
|
17
|
+
|
|
18
|
+
**Questions to Address:**
|
|
19
|
+
- What types of testing are required for this implementation?
|
|
20
|
+
- What are the quality gates and acceptance criteria?
|
|
21
|
+
- What test coverage levels need to be achieved?
|
|
22
|
+
- What performance benchmarks must be met?
|
|
23
|
+
- What accessibility and compliance standards apply?
|
|
24
|
+
- What are the critical user paths that must be validated?
|
|
25
|
+
|
|
26
|
+
### Phase 2: Testing Strategy Design
|
|
27
|
+
**Testing Architecture Planning:**
|
|
28
|
+
- Test pyramid strategy (unit, integration, e2e)
|
|
29
|
+
- Test data management and fixture design
|
|
30
|
+
- Testing environment setup and configuration
|
|
31
|
+
- Continuous integration and automated testing
|
|
32
|
+
- Performance testing and benchmarking approach
|
|
33
|
+
- Quality metrics and reporting strategy
|
|
34
|
+
|
|
35
|
+
**Testing Design Decisions:**
|
|
36
|
+
- Choose appropriate testing frameworks and tools
|
|
37
|
+
- Define test data strategies and management
|
|
38
|
+
- Plan testing environments and infrastructure
|
|
39
|
+
- Establish quality gates and validation criteria
|
|
40
|
+
- Design performance testing and monitoring
|
|
41
|
+
|
|
42
|
+
### Phase 3: Implementation
|
|
43
|
+
**Systematic Testing Implementation:**
|
|
44
|
+
|
|
45
|
+
#### Unit Testing Implementation
|
|
46
|
+
```typescript
|
|
47
|
+
// Example comprehensive unit test suite
|
|
48
|
+
describe('TaskService', () => {
|
|
49
|
+
let taskService: TaskService;
|
|
50
|
+
let mockRepository: jest.Mocked<TaskRepository>;
|
|
51
|
+
|
|
52
|
+
beforeEach(() => {
|
|
53
|
+
mockRepository = createMockRepository();
|
|
54
|
+
taskService = new TaskService(mockRepository);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
describe('createTask', () => {
|
|
58
|
+
it('should create task with valid data', async () => {
|
|
59
|
+
const taskData = {
|
|
60
|
+
title: 'Test Task',
|
|
61
|
+
description: 'Test Description',
|
|
62
|
+
assigneeId: 'user-123'
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const expectedTask = { id: 'task-456', ...taskData };
|
|
66
|
+
mockRepository.create.mockResolvedValue(expectedTask);
|
|
67
|
+
|
|
68
|
+
const result = await taskService.createTask(taskData);
|
|
69
|
+
|
|
70
|
+
expect(result).toEqual(expectedTask);
|
|
71
|
+
expect(mockRepository.create).toHaveBeenCalledWith(taskData);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it('should validate required fields', async () => {
|
|
75
|
+
const invalidData = { description: 'Missing title' };
|
|
76
|
+
|
|
77
|
+
await expect(taskService.createTask(invalidData))
|
|
78
|
+
.rejects.toThrow('Title is required');
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('should handle repository errors gracefully', async () => {
|
|
82
|
+
const taskData = { title: 'Test', description: 'Test' };
|
|
83
|
+
mockRepository.create.mockRejectedValue(new Error('Database error'));
|
|
84
|
+
|
|
85
|
+
await expect(taskService.createTask(taskData))
|
|
86
|
+
.rejects.toThrow('Failed to create task');
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
describe('updateTaskStatus', () => {
|
|
91
|
+
it('should update task status with audit trail', async () => {
|
|
92
|
+
const taskId = 'task-123';
|
|
93
|
+
const newStatus = 'completed';
|
|
94
|
+
const userId = 'user-456';
|
|
95
|
+
|
|
96
|
+
const existingTask = { id: taskId, status: 'in-progress' };
|
|
97
|
+
const updatedTask = { ...existingTask, status: newStatus };
|
|
98
|
+
|
|
99
|
+
mockRepository.findById.mockResolvedValue(existingTask);
|
|
100
|
+
mockRepository.update.mockResolvedValue(updatedTask);
|
|
101
|
+
|
|
102
|
+
const result = await taskService.updateTaskStatus(taskId, newStatus, userId);
|
|
103
|
+
|
|
104
|
+
expect(result.status).toBe(newStatus);
|
|
105
|
+
expect(mockRepository.update).toHaveBeenCalledWith(taskId, { status: newStatus });
|
|
106
|
+
// Verify audit trail creation
|
|
107
|
+
expect(mockRepository.createAuditEntry).toHaveBeenCalledWith({
|
|
108
|
+
taskId,
|
|
109
|
+
action: 'status_change',
|
|
110
|
+
oldValue: 'in-progress',
|
|
111
|
+
newValue: newStatus,
|
|
112
|
+
userId
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Integration Testing Implementation
|
|
120
|
+
```typescript
|
|
121
|
+
// Example API integration test
|
|
122
|
+
describe('Task API Integration', () => {
|
|
123
|
+
let app: Application;
|
|
124
|
+
let testDb: TestDatabase;
|
|
125
|
+
let authToken: string;
|
|
126
|
+
|
|
127
|
+
beforeAll(async () => {
|
|
128
|
+
testDb = await setupTestDatabase();
|
|
129
|
+
app = createTestApp(testDb);
|
|
130
|
+
authToken = await getTestAuthToken();
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
afterAll(async () => {
|
|
134
|
+
await testDb.cleanup();
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
beforeEach(async () => {
|
|
138
|
+
await testDb.reset();
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
describe('POST /api/tasks', () => {
|
|
142
|
+
it('should create task with authentication', async () => {
|
|
143
|
+
const taskData = {
|
|
144
|
+
title: 'Integration Test Task',
|
|
145
|
+
description: 'Testing API integration',
|
|
146
|
+
priority: 'high'
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const response = await request(app)
|
|
150
|
+
.post('/api/tasks')
|
|
151
|
+
.set('Authorization', `Bearer ${authToken}`)
|
|
152
|
+
.send(taskData)
|
|
153
|
+
.expect(201);
|
|
154
|
+
|
|
155
|
+
expect(response.body).toMatchObject({
|
|
156
|
+
success: true,
|
|
157
|
+
data: expect.objectContaining({
|
|
158
|
+
id: expect.any(String),
|
|
159
|
+
title: taskData.title,
|
|
160
|
+
description: taskData.description,
|
|
161
|
+
priority: taskData.priority,
|
|
162
|
+
status: 'todo',
|
|
163
|
+
createdAt: expect.any(String)
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
// Verify task was actually created in database
|
|
168
|
+
const createdTask = await testDb.tasks.findById(response.body.data.id);
|
|
169
|
+
expect(createdTask).toBeTruthy();
|
|
170
|
+
expect(createdTask.title).toBe(taskData.title);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it('should reject unauthenticated requests', async () => {
|
|
174
|
+
const taskData = { title: 'Unauthorized Task' };
|
|
175
|
+
|
|
176
|
+
await request(app)
|
|
177
|
+
.post('/api/tasks')
|
|
178
|
+
.send(taskData)
|
|
179
|
+
.expect(401);
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
it('should validate input data', async () => {
|
|
183
|
+
const invalidData = { description: 'Missing title' };
|
|
184
|
+
|
|
185
|
+
const response = await request(app)
|
|
186
|
+
.post('/api/tasks')
|
|
187
|
+
.set('Authorization', `Bearer ${authToken}`)
|
|
188
|
+
.send(invalidData)
|
|
189
|
+
.expect(400);
|
|
190
|
+
|
|
191
|
+
expect(response.body.error).toContain('title');
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
describe('GET /api/tasks', () => {
|
|
196
|
+
beforeEach(async () => {
|
|
197
|
+
// Seed test data
|
|
198
|
+
await testDb.tasks.createMany([
|
|
199
|
+
{ title: 'Task 1', status: 'todo', assigneeId: 'user-1' },
|
|
200
|
+
{ title: 'Task 2', status: 'in-progress', assigneeId: 'user-1' },
|
|
201
|
+
{ title: 'Task 3', status: 'completed', assigneeId: 'user-2' }
|
|
202
|
+
]);
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
it('should return user tasks with pagination', async () => {
|
|
206
|
+
const response = await request(app)
|
|
207
|
+
.get('/api/tasks?page=1&limit=2')
|
|
208
|
+
.set('Authorization', `Bearer ${authToken}`)
|
|
209
|
+
.expect(200);
|
|
210
|
+
|
|
211
|
+
expect(response.body).toMatchObject({
|
|
212
|
+
success: true,
|
|
213
|
+
data: expect.arrayContaining([
|
|
214
|
+
expect.objectContaining({ title: expect.any(String) })
|
|
215
|
+
]),
|
|
216
|
+
pagination: {
|
|
217
|
+
page: 1,
|
|
218
|
+
limit: 2,
|
|
219
|
+
total: expect.any(Number),
|
|
220
|
+
totalPages: expect.any(Number)
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
it('should filter tasks by status', async () => {
|
|
226
|
+
const response = await request(app)
|
|
227
|
+
.get('/api/tasks?status=completed')
|
|
228
|
+
.set('Authorization', `Bearer ${authToken}`)
|
|
229
|
+
.expect(200);
|
|
230
|
+
|
|
231
|
+
expect(response.body.data).toHaveLength(1);
|
|
232
|
+
expect(response.body.data[0].status).toBe('completed');
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
#### End-to-End Testing Implementation
|
|
239
|
+
```typescript
|
|
240
|
+
// Example E2E test with Playwright
|
|
241
|
+
import { test, expect } from '@playwright/test';
|
|
242
|
+
|
|
243
|
+
test.describe('Task Management Workflow', () => {
|
|
244
|
+
test.beforeEach(async ({ page }) => {
|
|
245
|
+
// Setup test data and authenticate
|
|
246
|
+
await page.goto('/login');
|
|
247
|
+
await page.fill('[data-testid="email"]', 'test@example.com');
|
|
248
|
+
await page.fill('[data-testid="password"]', 'testpassword');
|
|
249
|
+
await page.click('[data-testid="login-button"]');
|
|
250
|
+
await expect(page).toHaveURL('/dashboard');
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
test('should complete full task lifecycle', async ({ page }) => {
|
|
254
|
+
// Create new task
|
|
255
|
+
await page.click('[data-testid="create-task-button"]');
|
|
256
|
+
await page.fill('[data-testid="task-title"]', 'E2E Test Task');
|
|
257
|
+
await page.fill('[data-testid="task-description"]', 'Testing complete workflow');
|
|
258
|
+
await page.selectOption('[data-testid="task-priority"]', 'high');
|
|
259
|
+
await page.click('[data-testid="save-task-button"]');
|
|
260
|
+
|
|
261
|
+
// Verify task appears in list
|
|
262
|
+
await expect(page.locator('[data-testid="task-list"]')).toContainText('E2E Test Task');
|
|
263
|
+
|
|
264
|
+
// Update task status
|
|
265
|
+
const taskCard = page.locator('[data-testid="task-card"]').filter({ hasText: 'E2E Test Task' });
|
|
266
|
+
await taskCard.locator('[data-testid="status-dropdown"]').selectOption('in-progress');
|
|
267
|
+
|
|
268
|
+
// Verify status update
|
|
269
|
+
await expect(taskCard.locator('[data-testid="task-status"]')).toHaveText('In Progress');
|
|
270
|
+
|
|
271
|
+
// Complete task
|
|
272
|
+
await taskCard.locator('[data-testid="status-dropdown"]').selectOption('completed');
|
|
273
|
+
await expect(taskCard.locator('[data-testid="task-status"]')).toHaveText('Completed');
|
|
274
|
+
|
|
275
|
+
// Verify task completion timestamp
|
|
276
|
+
await expect(taskCard.locator('[data-testid="completed-at"]')).toBeVisible();
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
test('should handle task validation errors', async ({ page }) => {
|
|
280
|
+
await page.click('[data-testid="create-task-button"]');
|
|
281
|
+
|
|
282
|
+
// Try to save without required fields
|
|
283
|
+
await page.click('[data-testid="save-task-button"]');
|
|
284
|
+
|
|
285
|
+
// Verify validation errors
|
|
286
|
+
await expect(page.locator('[data-testid="title-error"]')).toHaveText('Title is required');
|
|
287
|
+
|
|
288
|
+
// Fill title and try again
|
|
289
|
+
await page.fill('[data-testid="task-title"]', 'Valid Title');
|
|
290
|
+
await page.click('[data-testid="save-task-button"]');
|
|
291
|
+
|
|
292
|
+
// Should succeed now
|
|
293
|
+
await expect(page.locator('[data-testid="task-list"]')).toContainText('Valid Title');
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
test('should support task search and filtering', async ({ page }) => {
|
|
297
|
+
// Search for specific task
|
|
298
|
+
await page.fill('[data-testid="search-input"]', 'E2E Test');
|
|
299
|
+
await page.press('[data-testid="search-input"]', 'Enter');
|
|
300
|
+
|
|
301
|
+
// Verify search results
|
|
302
|
+
const searchResults = page.locator('[data-testid="task-card"]');
|
|
303
|
+
await expect(searchResults).toHaveCount(1);
|
|
304
|
+
await expect(searchResults.first()).toContainText('E2E Test Task');
|
|
305
|
+
|
|
306
|
+
// Filter by status
|
|
307
|
+
await page.selectOption('[data-testid="status-filter"]', 'completed');
|
|
308
|
+
await expect(page.locator('[data-testid="task-card"]')).toHaveCount(1);
|
|
309
|
+
|
|
310
|
+
// Clear filters
|
|
311
|
+
await page.click('[data-testid="clear-filters"]');
|
|
312
|
+
await expect(page.locator('[data-testid="task-card"]')).toHaveCount.toBeGreaterThan(1);
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Phase 4: Performance Testing Implementation
|
|
318
|
+
**Performance Testing Strategy:**
|
|
319
|
+
- Load testing for API endpoints
|
|
320
|
+
- Stress testing for concurrent users
|
|
321
|
+
- Performance regression testing
|
|
322
|
+
- Database query performance validation
|
|
323
|
+
- Frontend rendering performance testing
|
|
324
|
+
- Memory leak detection and prevention
|
|
325
|
+
|
|
326
|
+
**Performance Testing Examples:**
|
|
327
|
+
```typescript
|
|
328
|
+
// API Load Testing
|
|
329
|
+
describe('API Performance Tests', () => {
|
|
330
|
+
test('should handle concurrent task creation', async () => {
|
|
331
|
+
const concurrentRequests = 50;
|
|
332
|
+
const taskData = { title: 'Load Test Task', description: 'Performance testing' };
|
|
333
|
+
|
|
334
|
+
const startTime = Date.now();
|
|
335
|
+
|
|
336
|
+
const promises = Array(concurrentRequests).fill(null).map(() =>
|
|
337
|
+
request(app)
|
|
338
|
+
.post('/api/tasks')
|
|
339
|
+
.set('Authorization', `Bearer ${authToken}`)
|
|
340
|
+
.send(taskData)
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
const responses = await Promise.all(promises);
|
|
344
|
+
const endTime = Date.now();
|
|
345
|
+
|
|
346
|
+
// Verify all requests succeeded
|
|
347
|
+
responses.forEach(response => {
|
|
348
|
+
expect(response.status).toBe(201);
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
// Verify performance requirements
|
|
352
|
+
const totalTime = endTime - startTime;
|
|
353
|
+
const avgResponseTime = totalTime / concurrentRequests;
|
|
354
|
+
|
|
355
|
+
expect(avgResponseTime).toBeLessThan(500); // < 500ms average
|
|
356
|
+
expect(totalTime).toBeLessThan(5000); // < 5s total
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// Frontend Performance Testing
|
|
361
|
+
test('should render task list within performance budget', async ({ page }) => {
|
|
362
|
+
// Navigate to page with many tasks
|
|
363
|
+
await page.goto('/tasks?limit=100');
|
|
364
|
+
|
|
365
|
+
// Measure performance metrics
|
|
366
|
+
const metrics = await page.evaluate(() => {
|
|
367
|
+
return {
|
|
368
|
+
lcp: performance.getEntriesByType('largest-contentful-paint')[0]?.startTime,
|
|
369
|
+
fid: performance.getEntriesByType('first-input')[0]?.processingStart,
|
|
370
|
+
cls: performance.getEntriesByType('layout-shift').reduce((sum, entry) => sum + entry.value, 0)
|
|
371
|
+
};
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
// Verify Core Web Vitals
|
|
375
|
+
expect(metrics.lcp).toBeLessThan(2500); // LCP < 2.5s
|
|
376
|
+
expect(metrics.fid).toBeLessThan(100); // FID < 100ms
|
|
377
|
+
expect(metrics.cls).toBeLessThan(0.1); // CLS < 0.1
|
|
378
|
+
});
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Phase 5: Accessibility Testing Implementation
|
|
382
|
+
**Accessibility Testing Strategy:**
|
|
383
|
+
- Automated accessibility scanning
|
|
384
|
+
- Keyboard navigation testing
|
|
385
|
+
- Screen reader compatibility testing
|
|
386
|
+
- Color contrast validation
|
|
387
|
+
- ARIA attribute verification
|
|
388
|
+
- Focus management testing
|
|
389
|
+
|
|
390
|
+
**Accessibility Testing Examples:**
|
|
391
|
+
```typescript
|
|
392
|
+
// Automated Accessibility Testing
|
|
393
|
+
import { axe, toHaveNoViolations } from 'jest-axe';
|
|
394
|
+
|
|
395
|
+
expect.extend(toHaveNoViolations);
|
|
396
|
+
|
|
397
|
+
describe('Accessibility Tests', () => {
|
|
398
|
+
test('should have no accessibility violations', async () => {
|
|
399
|
+
const { container } = render(<TaskList tasks={mockTasks} />);
|
|
400
|
+
const results = await axe(container);
|
|
401
|
+
expect(results).toHaveNoViolations();
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
test('should support keyboard navigation', async ({ page }) => {
|
|
405
|
+
await page.goto('/tasks');
|
|
406
|
+
|
|
407
|
+
// Tab through interactive elements
|
|
408
|
+
await page.keyboard.press('Tab');
|
|
409
|
+
await expect(page.locator('[data-testid="create-task-button"]')).toBeFocused();
|
|
410
|
+
|
|
411
|
+
await page.keyboard.press('Tab');
|
|
412
|
+
await expect(page.locator('[data-testid="search-input"]')).toBeFocused();
|
|
413
|
+
|
|
414
|
+
// Test keyboard activation
|
|
415
|
+
await page.keyboard.press('Enter');
|
|
416
|
+
await expect(page.locator('[data-testid="task-modal"]')).toBeVisible();
|
|
417
|
+
|
|
418
|
+
// Test escape key
|
|
419
|
+
await page.keyboard.press('Escape');
|
|
420
|
+
await expect(page.locator('[data-testid="task-modal"]')).not.toBeVisible();
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
test('should provide proper ARIA labels', async ({ page }) => {
|
|
424
|
+
await page.goto('/tasks');
|
|
425
|
+
|
|
426
|
+
// Verify ARIA labels exist
|
|
427
|
+
await expect(page.locator('[aria-label="Create new task"]')).toBeVisible();
|
|
428
|
+
await expect(page.locator('[aria-label="Search tasks"]')).toBeVisible();
|
|
429
|
+
|
|
430
|
+
// Verify screen reader announcements
|
|
431
|
+
const taskCard = page.locator('[data-testid="task-card"]').first();
|
|
432
|
+
await expect(taskCard).toHaveAttribute('role', 'article');
|
|
433
|
+
await expect(taskCard).toHaveAttribute('aria-labelledby');
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
### Phase 6: Quality Metrics and Reporting
|
|
439
|
+
**Quality Metrics Collection:**
|
|
440
|
+
- Test coverage analysis and reporting
|
|
441
|
+
- Performance benchmark tracking
|
|
442
|
+
- Accessibility compliance scoring
|
|
443
|
+
- Code quality metrics integration
|
|
444
|
+
- Bug detection and resolution tracking
|
|
445
|
+
- Quality trend analysis and insights
|
|
446
|
+
|
|
447
|
+
### Phase 7: Continuous Integration
|
|
448
|
+
**CI/CD Testing Integration:**
|
|
449
|
+
- Automated test execution on code changes
|
|
450
|
+
- Quality gate enforcement in deployment pipeline
|
|
451
|
+
- Performance regression detection
|
|
452
|
+
- Security vulnerability scanning
|
|
453
|
+
- Accessibility compliance validation
|
|
454
|
+
- Test result reporting and notifications
|
|
455
|
+
|
|
456
|
+
## Testing-Specific Validation Checklist
|
|
457
|
+
|
|
458
|
+
### Test Coverage Validation
|
|
459
|
+
- [ ] Unit test coverage meets target thresholds (80%+)
|
|
460
|
+
- [ ] Integration tests cover all API endpoints
|
|
461
|
+
- [ ] E2E tests validate critical user journeys
|
|
462
|
+
- [ ] Edge cases and error scenarios tested
|
|
463
|
+
- [ ] Performance tests validate response times
|
|
464
|
+
- [ ] Accessibility tests ensure WCAG compliance
|
|
465
|
+
|
|
466
|
+
### Quality Gate Validation
|
|
467
|
+
- [ ] All tests pass before deployment
|
|
468
|
+
- [ ] Code coverage thresholds maintained
|
|
469
|
+
- [ ] Performance benchmarks not regressed
|
|
470
|
+
- [ ] Security scans show no critical issues
|
|
471
|
+
- [ ] Accessibility compliance verified
|
|
472
|
+
- [ ] Documentation updated with test results
|
|
473
|
+
|
|
474
|
+
### Testing Infrastructure Validation
|
|
475
|
+
- [ ] Test environments properly configured
|
|
476
|
+
- [ ] Test data management automated
|
|
477
|
+
- [ ] CI/CD pipeline includes all test types
|
|
478
|
+
- [ ] Test results properly reported
|
|
479
|
+
- [ ] Quality metrics tracked over time
|
|
480
|
+
- [ ] Testing tools and frameworks up to date
|
|
481
|
+
|
|
482
|
+
### Performance Validation
|
|
483
|
+
- [ ] API response times within acceptable limits
|
|
484
|
+
- [ ] Frontend performance meets Core Web Vitals
|
|
485
|
+
- [ ] Database queries optimized and tested
|
|
486
|
+
- [ ] Memory usage within acceptable bounds
|
|
487
|
+
- [ ] Concurrent user load handled properly
|
|
488
|
+
- [ ] Performance regression tests automated
|
|
489
|
+
|
|
490
|
+
### Accessibility Validation
|
|
491
|
+
- [ ] WCAG 2.1 AA compliance achieved
|
|
492
|
+
- [ ] Keyboard navigation fully functional
|
|
493
|
+
- [ ] Screen reader compatibility verified
|
|
494
|
+
- [ ] Color contrast meets standards
|
|
495
|
+
- [ ] Focus management appropriate
|
|
496
|
+
- [ ] ARIA attributes properly implemented
|
|
497
|
+
|
|
498
|
+
## Testing Implementation Success Criteria
|
|
499
|
+
|
|
500
|
+
### Comprehensive Coverage
|
|
501
|
+
- All functionality covered by appropriate test types
|
|
502
|
+
- Critical user paths validated with E2E tests
|
|
503
|
+
- Performance requirements verified with benchmarks
|
|
504
|
+
- Accessibility standards met with automated testing
|
|
505
|
+
- Security vulnerabilities prevented with scanning
|
|
506
|
+
|
|
507
|
+
### Quality Assurance
|
|
508
|
+
- Quality gates prevent regression and maintain standards
|
|
509
|
+
- Automated testing provides fast feedback
|
|
510
|
+
- Performance monitoring prevents degradation
|
|
511
|
+
- Accessibility compliance ensures inclusive design
|
|
512
|
+
- Security testing prevents vulnerabilities
|
|
513
|
+
|
|
514
|
+
### Process Excellence
|
|
515
|
+
- Testing is integrated into development workflow
|
|
516
|
+
- Quality metrics provide actionable insights
|
|
517
|
+
- Continuous improvement based on test results
|
|
518
|
+
- Team adoption of testing best practices
|
|
519
|
+
- Documentation supports testing activities
|
|
520
|
+
|
|
521
|
+
### Reliability and Maintainability
|
|
522
|
+
- Tests are reliable and not flaky
|
|
523
|
+
- Test maintenance is manageable and efficient
|
|
524
|
+
- Testing infrastructure is scalable
|
|
525
|
+
- Quality standards are consistently enforced
|
|
526
|
+
- Testing provides confidence for deployments
|
|
527
|
+
|
|
528
|
+
This testing-specific execution framework ensures comprehensive quality validation with systematic testing strategies, automated quality gates, and continuous improvement processes.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute an implementation plan
|
|
3
|
+
argument-hint: [path-to-plan]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Execute: Implement from Plan
|
|
7
|
+
|
|
8
|
+
## Plan to Execute
|
|
9
|
+
|
|
10
|
+
Read plan file: `$ARGUMENTS`
|
|
11
|
+
|
|
12
|
+
## Execution Instructions
|
|
13
|
+
|
|
14
|
+
### 1. Read and Understand
|
|
15
|
+
|
|
16
|
+
- Read the ENTIRE plan carefully
|
|
17
|
+
- Understand all tasks and their dependencies
|
|
18
|
+
- Note the validation commands to run
|
|
19
|
+
- Review the testing strategy
|
|
20
|
+
|
|
21
|
+
### 2. Execute Tasks in Order
|
|
22
|
+
|
|
23
|
+
For EACH task in "Step by Step Tasks":
|
|
24
|
+
|
|
25
|
+
#### a. Navigate to the task
|
|
26
|
+
- Identify the file and action required
|
|
27
|
+
- Read existing related files if modifying
|
|
28
|
+
|
|
29
|
+
#### b. Implement the task
|
|
30
|
+
- Follow the detailed specifications exactly
|
|
31
|
+
- Maintain consistency with existing code patterns
|
|
32
|
+
- Include proper type hints and documentation
|
|
33
|
+
- Add structured logging where appropriate
|
|
34
|
+
|
|
35
|
+
#### c. Verify as you go
|
|
36
|
+
- After each file change, check syntax
|
|
37
|
+
- Ensure imports are correct
|
|
38
|
+
- Verify types are properly defined
|
|
39
|
+
|
|
40
|
+
### 3. Implement Testing Strategy
|
|
41
|
+
|
|
42
|
+
After completing implementation tasks:
|
|
43
|
+
|
|
44
|
+
- Create all test files specified in the plan
|
|
45
|
+
- Implement all test cases mentioned
|
|
46
|
+
- Follow the testing approach outlined
|
|
47
|
+
- Ensure tests cover edge cases
|
|
48
|
+
|
|
49
|
+
### 4. Run Validation Commands
|
|
50
|
+
|
|
51
|
+
Execute ALL validation commands from the plan in order:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Run each command exactly as specified in plan
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If any command fails:
|
|
58
|
+
- Fix the issue
|
|
59
|
+
- Re-run the command
|
|
60
|
+
- Continue only when it passes
|
|
61
|
+
|
|
62
|
+
### 5. Final Verification
|
|
63
|
+
|
|
64
|
+
Before completing:
|
|
65
|
+
|
|
66
|
+
- ✅ All tasks from plan completed
|
|
67
|
+
- ✅ All tests created and passing
|
|
68
|
+
- ✅ All validation commands pass
|
|
69
|
+
- ✅ Code follows project conventions
|
|
70
|
+
- ✅ Documentation added/updated as needed
|
|
71
|
+
|
|
72
|
+
## Output Report
|
|
73
|
+
|
|
74
|
+
Provide summary:
|
|
75
|
+
|
|
76
|
+
### Completed Tasks
|
|
77
|
+
- List of all tasks completed
|
|
78
|
+
- Files created (with paths)
|
|
79
|
+
- Files modified (with paths)
|
|
80
|
+
|
|
81
|
+
### Tests Added
|
|
82
|
+
- Test files created
|
|
83
|
+
- Test cases implemented
|
|
84
|
+
- Test results
|
|
85
|
+
|
|
86
|
+
### Validation Results
|
|
87
|
+
```bash
|
|
88
|
+
# Output from each validation command
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Ready for Commit
|
|
92
|
+
- Confirm all changes are complete
|
|
93
|
+
- Confirm all validations pass
|
|
94
|
+
- Ready for `/commit` command
|
|
95
|
+
|
|
96
|
+
## Notes
|
|
97
|
+
|
|
98
|
+
- If you encounter issues not addressed in the plan, document them
|
|
99
|
+
- If you need to deviate from the plan, explain why
|
|
100
|
+
- If tests fail, fix implementation until they pass
|
|
101
|
+
- Don't skip validation steps
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate implementation report for system review
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Execution Report
|
|
6
|
+
|
|
7
|
+
Review and deeply analyze the implementation you just completed.
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
You have just finished implementing a feature. Before moving on, reflect on:
|
|
12
|
+
|
|
13
|
+
- What you implemented
|
|
14
|
+
- How it aligns with the plan
|
|
15
|
+
- What challenges you encountered
|
|
16
|
+
- What diverged and why
|
|
17
|
+
|
|
18
|
+
## Generate Report
|
|
19
|
+
|
|
20
|
+
Save to: `.kiro/execution-reports/[feature-name].md`
|
|
21
|
+
|
|
22
|
+
### Meta Information
|
|
23
|
+
|
|
24
|
+
- Plan file: [path to plan that guided this implementation]
|
|
25
|
+
- Files added: [list with paths]
|
|
26
|
+
- Files modified: [list with paths]
|
|
27
|
+
- Lines changed: +X -Y
|
|
28
|
+
|
|
29
|
+
### Validation Results
|
|
30
|
+
|
|
31
|
+
- Syntax & Linting: ✓/✗ [details if failed]
|
|
32
|
+
- Type Checking: ✓/✗ [details if failed]
|
|
33
|
+
- Unit Tests: ✓/✗ [X passed, Y failed]
|
|
34
|
+
- Integration Tests: ✓/✗ [X passed, Y failed]
|
|
35
|
+
|
|
36
|
+
### What Went Well
|
|
37
|
+
|
|
38
|
+
List specific things that worked smoothly:
|
|
39
|
+
|
|
40
|
+
- [concrete examples]
|
|
41
|
+
|
|
42
|
+
### Challenges Encountered
|
|
43
|
+
|
|
44
|
+
List specific difficulties:
|
|
45
|
+
|
|
46
|
+
- [what was difficult and why]
|
|
47
|
+
|
|
48
|
+
### Divergences from Plan
|
|
49
|
+
|
|
50
|
+
For each divergence, document:
|
|
51
|
+
|
|
52
|
+
**[Divergence Title]**
|
|
53
|
+
|
|
54
|
+
- Planned: [what the plan specified]
|
|
55
|
+
- Actual: [what was implemented instead]
|
|
56
|
+
- Reason: [why this divergence occurred]
|
|
57
|
+
- Type: [Better approach found | Plan assumption wrong | Security concern | Performance issue | Other]
|
|
58
|
+
|
|
59
|
+
### Skipped Items
|
|
60
|
+
|
|
61
|
+
List anything from the plan that was not implemented:
|
|
62
|
+
|
|
63
|
+
- [what was skipped]
|
|
64
|
+
- Reason: [why it was skipped]
|
|
65
|
+
|
|
66
|
+
### Recommendations
|
|
67
|
+
|
|
68
|
+
Based on this implementation, what should change for next time?
|
|
69
|
+
|
|
70
|
+
- Plan command improvements: [suggestions]
|
|
71
|
+
- Execute command improvements: [suggestions]
|
|
72
|
+
- Steering document additions: [suggestions]
|