testdriverai 7.2.3 → 7.2.10
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/.github/workflows/publish.yaml +15 -7
- package/.github/workflows/testdriver.yml +163 -0
- package/.testdriver/last-sandbox +7 -0
- package/agent/events.js +1 -0
- package/agent/index.js +99 -163
- package/agent/lib/sandbox.js +11 -1
- package/agents.md +393 -0
- package/bin/testdriverai.js +8 -0
- package/debug/01-table-initial.png +0 -0
- package/debug/02-after-ai-explore.png +0 -0
- package/debug/02-after-scroll.png +0 -0
- package/debugger/index.html +37 -0
- package/docs/docs.json +93 -125
- package/docs/v7/_drafts/architecture.mdx +1 -26
- package/docs/v7/_drafts/caching.mdx +2 -2
- package/docs/v7/{getting-started → _drafts}/installation.mdx +0 -66
- package/docs/v7/{features/coverage.mdx → _drafts/powerful.mdx} +1 -90
- package/docs/v7/_drafts/quick-start-test-recording.mdx +0 -1
- package/docs/v7/{features → _drafts}/scalable.mdx +126 -4
- package/docs/v7/_drafts/screenshot.mdx +155 -0
- package/docs/v7/_drafts/test-recording.mdx +0 -6
- package/docs/v7/_drafts/writing-tests.mdx +25 -0
- package/docs/v7/{api/act.mdx → ai.mdx} +28 -27
- package/docs/v7/{api/assert.mdx → assert.mdx} +3 -3
- package/docs/v7/aws-setup.mdx +338 -0
- package/docs/v7/caching.mdx +128 -0
- package/docs/v7/ci-cd.mdx +605 -0
- package/docs/v7/{api/click.mdx → click.mdx} +4 -4
- package/docs/v7/cloud.mdx +120 -0
- package/docs/v7/customizing-devices.mdx +129 -0
- package/docs/v7/{api/doubleClick.mdx → double-click.mdx} +5 -5
- package/docs/v7/enterprise.mdx +135 -0
- package/docs/v7/examples.mdx +5 -0
- package/docs/v7/{api/exec.mdx → exec.mdx} +3 -3
- package/docs/v7/{api/find.mdx → find.mdx} +17 -21
- package/docs/v7/{api/focusApplication.mdx → focus-application.mdx} +3 -3
- package/docs/v7/generating-tests.mdx +32 -0
- package/docs/v7/{api/hover.mdx → hover.mdx} +3 -3
- package/docs/v7/locating-elements.mdx +71 -0
- package/docs/v7/making-assertions.mdx +32 -0
- package/docs/v7/{api/mouseDown.mdx → mouse-down.mdx} +7 -7
- package/docs/v7/{api/mouseUp.mdx → mouse-up.mdx} +8 -8
- package/docs/v7/performing-actions.mdx +51 -0
- package/docs/v7/{api/pressKeys.mdx → press-keys.mdx} +3 -3
- package/docs/v7/quickstart.mdx +162 -0
- package/docs/v7/reusable-code.mdx +240 -0
- package/docs/v7/{api/rightClick.mdx → right-click.mdx} +5 -5
- package/docs/v7/running-tests.mdx +181 -0
- package/docs/v7/{api/scroll.mdx → scroll.mdx} +3 -3
- package/docs/v7/secrets.mdx +115 -0
- package/docs/v7/self-hosted.mdx +66 -0
- package/docs/v7/{api/type.mdx → type.mdx} +3 -3
- package/docs/v7/variables.mdx +111 -0
- package/docs/v7/waiting-for-elements.mdx +66 -0
- package/docs/v7/what-is-testdriver.mdx +54 -0
- package/interfaces/cli/commands/init.js +33 -19
- package/interfaces/cli/lib/base.js +24 -0
- package/interfaces/cli.js +8 -1
- package/interfaces/logger.js +8 -3
- package/interfaces/vitest-plugin.mjs +16 -71
- package/lib/sentry.js +343 -0
- package/lib/vitest/hooks.mjs +81 -81
- package/package.json +4 -3
- package/sdk-log-formatter.js +41 -0
- package/sdk.d.ts +22 -9
- package/sdk.js +344 -100
- package/test/manual/reconnect-provision.test.mjs +49 -0
- package/test/manual/reconnect-signin.test.mjs +41 -0
- package/test/testdriver/act.test.mjs +30 -0
- package/test/testdriver/ai.test.mjs +30 -0
- package/test/testdriver/assert.test.mjs +1 -1
- package/test/testdriver/hover-text.test.mjs +1 -1
- package/test/testdriver/setup/testHelpers.mjs +8 -119
- package/test/testdriver/windows-installer.test.mjs +61 -0
- package/tests/example.test.js +33 -0
- package/tests/login.js +28 -0
- package/tests/table-sort-enrollments.test.mjs +72 -0
- package/tests/table-sort-experiment.test.mjs +42 -0
- package/tests/table-sort-setup.test.mjs +59 -0
- package/vitest.config.mjs +3 -1
- package/agent/lib/cache.js +0 -142
- package/docs/v7/api/assertions.mdx +0 -403
- package/docs/v7/features/ai-native.mdx +0 -413
- package/docs/v7/features/application-logs.mdx +0 -353
- package/docs/v7/features/browser-logs.mdx +0 -414
- package/docs/v7/features/cache-management.mdx +0 -402
- package/docs/v7/features/continuous-testing.mdx +0 -346
- package/docs/v7/features/data-driven-testing.mdx +0 -441
- package/docs/v7/features/easy-to-write.mdx +0 -280
- package/docs/v7/features/enterprise.mdx +0 -656
- package/docs/v7/features/fast.mdx +0 -406
- package/docs/v7/features/managed-sandboxes.mdx +0 -384
- package/docs/v7/features/network-monitoring.mdx +0 -568
- package/docs/v7/features/parallel-execution.mdx +0 -381
- package/docs/v7/features/powerful.mdx +0 -531
- package/docs/v7/features/sandbox-customization.mdx +0 -229
- package/docs/v7/features/stable.mdx +0 -473
- package/docs/v7/features/system-performance.mdx +0 -616
- package/docs/v7/features/test-analytics.mdx +0 -373
- package/docs/v7/features/test-cases.mdx +0 -393
- package/docs/v7/features/test-replays.mdx +0 -408
- package/docs/v7/features/test-reports.mdx +0 -308
- package/docs/v7/getting-started/debugging-tests.mdx +0 -382
- package/docs/v7/getting-started/quickstart.mdx +0 -90
- package/docs/v7/getting-started/running-tests.mdx +0 -173
- package/docs/v7/getting-started/setting-up-in-ci.mdx +0 -612
- package/docs/v7/getting-started/writing-tests.mdx +0 -534
- package/docs/v7/overview/what-is-testdriver.mdx +0 -386
- package/docs/v7/presets/chrome-extension.mdx +0 -248
- package/docs/v7/presets/chrome.mdx +0 -300
- package/docs/v7/presets/electron.mdx +0 -460
- package/docs/v7/presets/vscode.mdx +0 -417
- package/docs/v7/presets/webapp.mdx +0 -393
- /package/docs/v7/{commands → _drafts/commands}/assert.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/exec.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/focus-application.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/hover-image.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/hover-text.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/if.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/match-image.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/press-keys.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/remember.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/run.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/scroll-until-image.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/scroll-until-text.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/scroll.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/type.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/wait-for-image.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/wait-for-text.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/wait.mdx +0 -0
- /package/docs/v7/{getting-started → _drafts}/configuration.mdx +0 -0
- /package/docs/v7/{features → _drafts}/observable.mdx +0 -0
- /package/docs/v7/{platforms → _drafts/platforms}/linux.mdx +0 -0
- /package/docs/v7/{platforms → _drafts/platforms}/macos.mdx +0 -0
- /package/docs/v7/{platforms → _drafts/platforms}/windows.mdx +0 -0
- /package/docs/v7/{playwright.mdx → _drafts/playwright.mdx} +0 -0
- /package/docs/v7/{overview → _drafts}/readme.mdx +0 -0
- /package/docs/v7/{features → _drafts}/reports.mdx +0 -0
- /package/docs/v7/{api/client.mdx → client.mdx} +0 -0
- /package/docs/v7/{api/dashcam.mdx → dashcam.mdx} +0 -0
- /package/docs/v7/{api/elements.mdx → elements.mdx} +0 -0
- /package/docs/v7/{api/sandbox.mdx → sandbox.mdx} +0 -0
|
@@ -1,616 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "System Performance"
|
|
3
|
-
description: "CPU usage, memory consumption, and resource monitoring"
|
|
4
|
-
icon: "chart-line"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Monitor system resources during test execution including CPU usage, memory consumption, network traffic, and process-level diagnostics for performance optimization and troubleshooting.
|
|
8
|
-
|
|
9
|
-
## Performance Overview
|
|
10
|
-
|
|
11
|
-
Real-time system metrics during test execution:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
System Performance (Test Duration: 45s):
|
|
15
|
-
┌────────────────────────────────────────────────────┐
|
|
16
|
-
│ CPU Usage: │
|
|
17
|
-
│ Average: 42% Peak: 78% Current: 35% │
|
|
18
|
-
│ ████████████████████░░░░░░░░░░░░░░░ 42% │
|
|
19
|
-
│ │
|
|
20
|
-
│ Memory Usage: │
|
|
21
|
-
│ Used: 2.4 GB / 8 GB (30%) │
|
|
22
|
-
│ ██████████████░░░░░░░░░░░░░░░░░░░░░ 30% │
|
|
23
|
-
│ │
|
|
24
|
-
│ Network Traffic: │
|
|
25
|
-
│ Downloaded: 451 KB Uploaded: 12 KB │
|
|
26
|
-
│ Bandwidth: ▂▃▅▇▅▃▂▁▂▃▅▇▅▃▂ │
|
|
27
|
-
│ │
|
|
28
|
-
│ Disk I/O: │
|
|
29
|
-
│ Read: 12 MB Write: 3.4 MB │
|
|
30
|
-
│ ▂▁▂▃▂▁▂▁▁▂▃▅▃▂▁▂ │
|
|
31
|
-
└────────────────────────────────────────────────────┘
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## CPU Usage Timeline
|
|
35
|
-
|
|
36
|
-
Track CPU utilization over test duration:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
CPU Usage (0s → 45s):
|
|
40
|
-
┌────────────────────────────────────────────────────┐
|
|
41
|
-
│ 100%│ │
|
|
42
|
-
│ 90%│ │
|
|
43
|
-
│ 80%│ ██ │
|
|
44
|
-
│ 70%│ ████ │
|
|
45
|
-
│ 60%│ ██████ │
|
|
46
|
-
│ 50%│ ████████ │
|
|
47
|
-
│ 40%│ ████████████ ████ │
|
|
48
|
-
│ 30%│ ██████████████████████ │
|
|
49
|
-
│ 20%│ ████████████████████████████ │
|
|
50
|
-
│ 10%│██████████████████████████████████ │
|
|
51
|
-
│ 0%└──────┬──────┬──────┬──────┬──────┬────── │
|
|
52
|
-
│ 0s 10s 20s 30s 40s │
|
|
53
|
-
│ │
|
|
54
|
-
│ Key Events: │
|
|
55
|
-
│ [0:08] CPU spike: Page load (78%) │
|
|
56
|
-
│ [0:15] CPU spike: API processing (65%) │
|
|
57
|
-
│ [0:25] CPU spike: Dashboard render (72%) │
|
|
58
|
-
│ │
|
|
59
|
-
│ Statistics: │
|
|
60
|
-
│ Average: 42% │
|
|
61
|
-
│ Peak: 78% at 0:08 │
|
|
62
|
-
│ Lowest: 12% at 0:35 │
|
|
63
|
-
│ Std Dev: 18.5% │
|
|
64
|
-
└────────────────────────────────────────────────────┘
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Memory Usage
|
|
68
|
-
|
|
69
|
-
Monitor RAM consumption:
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
Memory Usage (0s → 45s):
|
|
73
|
-
┌────────────────────────────────────────────────────┐
|
|
74
|
-
│ 8 GB│ │
|
|
75
|
-
│ 7 GB│ │
|
|
76
|
-
│ 6 GB│ │
|
|
77
|
-
│ 5 GB│ │
|
|
78
|
-
│ 4 GB│ │
|
|
79
|
-
│ 3 GB│ ████████████████ │
|
|
80
|
-
│ 2 GB│ ██████████████████████████████ │
|
|
81
|
-
│ 1 GB│ ██████████████████████████████████████ │
|
|
82
|
-
│ 0 GB└──────┬──────┬──────┬──────┬──────┬────── │
|
|
83
|
-
│ 0s 10s 20s 30s 40s │
|
|
84
|
-
│ │
|
|
85
|
-
│ Memory Breakdown: │
|
|
86
|
-
│ Browser Process: 1.8 GB (75%) │
|
|
87
|
-
│ Renderer Process: 456 MB (19%) │
|
|
88
|
-
│ GPU Process: 89 MB (4%) │
|
|
89
|
-
│ TestDriver: 45 MB (2%) │
|
|
90
|
-
│ │
|
|
91
|
-
│ Heap Statistics: │
|
|
92
|
-
│ Total Heap Size: 234 MB │
|
|
93
|
-
│ Used Heap: 187 MB (80%) │
|
|
94
|
-
│ Heap Limit: 2048 MB │
|
|
95
|
-
│ │
|
|
96
|
-
│ Warnings: │
|
|
97
|
-
│ ⚠️ Memory increased 800MB during test │
|
|
98
|
-
│ ⚠️ Possible memory leak detected │
|
|
99
|
-
└────────────────────────────────────────────────────┘
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
<Warning>
|
|
103
|
-
Sustained memory growth may indicate memory leaks in the application. Check for unreleased event listeners or DOM references.
|
|
104
|
-
</Warning>
|
|
105
|
-
|
|
106
|
-
## Process-Level Metrics
|
|
107
|
-
|
|
108
|
-
Detailed breakdown by process:
|
|
109
|
-
|
|
110
|
-
<Tabs>
|
|
111
|
-
<Tab title="Browser Process">
|
|
112
|
-
```
|
|
113
|
-
Chrome Browser Process:
|
|
114
|
-
┌────────────────────────────────────────────────┐
|
|
115
|
-
│ PID: 12345 │
|
|
116
|
-
│ CPU: 25% (Average: 22%, Peak: 45%) │
|
|
117
|
-
│ Memory: 1.8 GB │
|
|
118
|
-
│ Threads: 24 │
|
|
119
|
-
│ │
|
|
120
|
-
│ Resource Usage: │
|
|
121
|
-
│ CPU Time: 12.3s │
|
|
122
|
-
│ Handles: 2,456 │
|
|
123
|
-
│ GDI Objects: 234 │
|
|
124
|
-
│ │
|
|
125
|
-
│ Network: │
|
|
126
|
-
│ Connections: 8 active │
|
|
127
|
-
│ Downloaded: 451 KB │
|
|
128
|
-
│ Uploaded: 12 KB │
|
|
129
|
-
└────────────────────────────────────────────────┘
|
|
130
|
-
```
|
|
131
|
-
</Tab>
|
|
132
|
-
|
|
133
|
-
<Tab title="Renderer Process">
|
|
134
|
-
```
|
|
135
|
-
Chrome Renderer Process:
|
|
136
|
-
┌────────────────────────────────────────────────┐
|
|
137
|
-
│ PID: 12346 │
|
|
138
|
-
│ CPU: 15% (Average: 18%, Peak: 56%) │
|
|
139
|
-
│ Memory: 456 MB │
|
|
140
|
-
│ Threads: 8 │
|
|
141
|
-
│ │
|
|
142
|
-
│ JavaScript Heap: │
|
|
143
|
-
│ Total: 234 MB │
|
|
144
|
-
│ Used: 187 MB (80%) │
|
|
145
|
-
│ Limit: 2048 MB │
|
|
146
|
-
│ │
|
|
147
|
-
│ DOM Nodes: │
|
|
148
|
-
│ Total: 3,456 nodes │
|
|
149
|
-
│ Listeners: 892 │
|
|
150
|
-
│ │
|
|
151
|
-
│ Frames: │
|
|
152
|
-
│ FPS: 60 (target) │
|
|
153
|
-
│ Actual: 58 avg │
|
|
154
|
-
└────────────────────────────────────────────────┘
|
|
155
|
-
```
|
|
156
|
-
</Tab>
|
|
157
|
-
|
|
158
|
-
<Tab title="GPU Process">
|
|
159
|
-
```
|
|
160
|
-
GPU Process:
|
|
161
|
-
┌────────────────────────────────────────────────┐
|
|
162
|
-
│ PID: 12347 │
|
|
163
|
-
│ CPU: 8% (Average: 6%, Peak: 22%) │
|
|
164
|
-
│ Memory: 89 MB │
|
|
165
|
-
│ Threads: 4 │
|
|
166
|
-
│ │
|
|
167
|
-
│ Graphics: │
|
|
168
|
-
│ GPU Usage: 12% │
|
|
169
|
-
│ Video Memory: 89 MB / 2 GB │
|
|
170
|
-
│ │
|
|
171
|
-
│ Rendering: │
|
|
172
|
-
│ Frames Rendered: 2,700 │
|
|
173
|
-
│ Compositor: Active │
|
|
174
|
-
│ Hardware Acceleration: Enabled │
|
|
175
|
-
└────────────────────────────────────────────────┘
|
|
176
|
-
```
|
|
177
|
-
</Tab>
|
|
178
|
-
|
|
179
|
-
<Tab title="TestDriver">
|
|
180
|
-
```
|
|
181
|
-
TestDriver Process:
|
|
182
|
-
┌────────────────────────────────────────────────┐
|
|
183
|
-
│ PID: 12348 │
|
|
184
|
-
│ CPU: 2% (Average: 3%, Peak: 8%) │
|
|
185
|
-
│ Memory: 45 MB │
|
|
186
|
-
│ Threads: 3 │
|
|
187
|
-
│ │
|
|
188
|
-
│ Test Execution: │
|
|
189
|
-
│ Commands Executed: 24 │
|
|
190
|
-
│ AI Vision Calls: 8 │
|
|
191
|
-
│ Cache Hits: 12 │
|
|
192
|
-
│ │
|
|
193
|
-
│ Resource Usage: │
|
|
194
|
-
│ Screenshot Count: 8 │
|
|
195
|
-
│ Screenshots Size: 12 MB │
|
|
196
|
-
│ Dashcam Recording: 23 MB │
|
|
197
|
-
└────────────────────────────────────────────────┘
|
|
198
|
-
```
|
|
199
|
-
</Tab>
|
|
200
|
-
</Tabs>
|
|
201
|
-
|
|
202
|
-
## Network Bandwidth
|
|
203
|
-
|
|
204
|
-
Track network throughput:
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
Network Bandwidth (0s → 45s):
|
|
208
|
-
┌────────────────────────────────────────────────────┐
|
|
209
|
-
│ Download Speed: │
|
|
210
|
-
│ 50 KB/s│ ▇▇ │
|
|
211
|
-
│ 40 KB/s│ ███▇ │
|
|
212
|
-
│ 30 KB/s│ ██████ │
|
|
213
|
-
│ 20 KB/s│ ████████▇ │
|
|
214
|
-
│ 10 KB/s│ ██████████████ │
|
|
215
|
-
│ 0 └──────┬──────┬──────┬──────┬────── │
|
|
216
|
-
│ 0s 10s 20s 30s 40s │
|
|
217
|
-
│ │
|
|
218
|
-
│ Upload Speed: │
|
|
219
|
-
│ 5 KB/s│ ▇ │
|
|
220
|
-
│ 4 KB/s│ █▇ │
|
|
221
|
-
│ 3 KB/s│ ██▇ │
|
|
222
|
-
│ 2 KB/s│ ████▇ │
|
|
223
|
-
│ 1 KB/s│▇▇█████▇ │
|
|
224
|
-
│ 0 └──────┬──────┬──────┬──────┬────── │
|
|
225
|
-
│ 0s 10s 20s 30s 40s │
|
|
226
|
-
│ │
|
|
227
|
-
│ Total Traffic: │
|
|
228
|
-
│ Downloaded: 451.6 KB │
|
|
229
|
-
│ Uploaded: 12.3 KB │
|
|
230
|
-
│ Ratio: 37:1 │
|
|
231
|
-
└────────────────────────────────────────────────────┘
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
## Disk I/O
|
|
235
|
-
|
|
236
|
-
Monitor disk read/write activity:
|
|
237
|
-
|
|
238
|
-
```
|
|
239
|
-
Disk I/O Operations:
|
|
240
|
-
┌────────────────────────────────────────────────────┐
|
|
241
|
-
│ Read Operations: │
|
|
242
|
-
│ Total: 12.4 MB │
|
|
243
|
-
│ Files Read: 234 │
|
|
244
|
-
│ Average Speed: 45 MB/s │
|
|
245
|
-
│ │
|
|
246
|
-
│ Top Read Operations: │
|
|
247
|
-
│ app.js 234 KB │
|
|
248
|
-
│ vendor.bundle.js 1.2 MB │
|
|
249
|
-
│ images/hero.jpg 456 KB │
|
|
250
|
-
│ styles.css 89 KB │
|
|
251
|
-
│ │
|
|
252
|
-
│ Write Operations: │
|
|
253
|
-
│ Total: 3.4 MB │
|
|
254
|
-
│ Files Written: 12 │
|
|
255
|
-
│ Average Speed: 67 MB/s │
|
|
256
|
-
│ │
|
|
257
|
-
│ Top Write Operations: │
|
|
258
|
-
│ dashcam-replay.webm 2.1 MB │
|
|
259
|
-
│ screenshots/*.png 892 KB │
|
|
260
|
-
│ cache/*.json 234 KB │
|
|
261
|
-
│ test-log.txt 89 KB │
|
|
262
|
-
└────────────────────────────────────────────────────┘
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
## Performance Bottlenecks
|
|
266
|
-
|
|
267
|
-
Identify performance issues:
|
|
268
|
-
|
|
269
|
-
<CardGroup cols={2}>
|
|
270
|
-
<Card title="High CPU Usage" icon="microchip" color="red">
|
|
271
|
-
```
|
|
272
|
-
❌ CPU spike detected
|
|
273
|
-
|
|
274
|
-
Time: 0:08
|
|
275
|
-
Peak: 78% CPU
|
|
276
|
-
Duration: 2.3s
|
|
277
|
-
|
|
278
|
-
Cause:
|
|
279
|
-
Heavy JavaScript execution
|
|
280
|
-
during page load
|
|
281
|
-
|
|
282
|
-
Recommendation:
|
|
283
|
-
Consider code splitting
|
|
284
|
-
or lazy loading
|
|
285
|
-
```
|
|
286
|
-
</Card>
|
|
287
|
-
|
|
288
|
-
<Card title="Memory Growth" icon="memory" color="yellow">
|
|
289
|
-
```
|
|
290
|
-
⚠️ Memory leak suspected
|
|
291
|
-
|
|
292
|
-
Start: 1.2 GB
|
|
293
|
-
End: 2.0 GB
|
|
294
|
-
Growth: +800 MB
|
|
295
|
-
|
|
296
|
-
Potential Causes:
|
|
297
|
-
- Unreleased listeners
|
|
298
|
-
- Cached DOM nodes
|
|
299
|
-
- Global variables
|
|
300
|
-
|
|
301
|
-
Action: Profile memory
|
|
302
|
-
```
|
|
303
|
-
</Card>
|
|
304
|
-
|
|
305
|
-
<Card title="Slow Network" icon="wifi" color="orange">
|
|
306
|
-
```
|
|
307
|
-
⚠️ Slow API response
|
|
308
|
-
|
|
309
|
-
Endpoint: /api/dashboard
|
|
310
|
-
Time: 445ms
|
|
311
|
-
Expected: <200ms
|
|
312
|
-
|
|
313
|
-
Impact:
|
|
314
|
-
Dashboard load delayed
|
|
315
|
-
|
|
316
|
-
Recommendation:
|
|
317
|
-
Add caching or optimize
|
|
318
|
-
database queries
|
|
319
|
-
```
|
|
320
|
-
</Card>
|
|
321
|
-
|
|
322
|
-
<Card title="Disk Bottleneck" icon="hard-drive" color="blue">
|
|
323
|
-
```
|
|
324
|
-
ℹ️ High disk I/O
|
|
325
|
-
|
|
326
|
-
Operation: Write
|
|
327
|
-
File: dashcam-replay.webm
|
|
328
|
-
Size: 2.1 MB
|
|
329
|
-
Time: 1.2s
|
|
330
|
-
|
|
331
|
-
Impact: Minimal
|
|
332
|
-
Expected for recording
|
|
333
|
-
```
|
|
334
|
-
</Card>
|
|
335
|
-
</CardGroup>
|
|
336
|
-
|
|
337
|
-
## Frame Rate (FPS)
|
|
338
|
-
|
|
339
|
-
Monitor rendering performance:
|
|
340
|
-
|
|
341
|
-
```
|
|
342
|
-
Frame Rate (60 FPS target):
|
|
343
|
-
┌────────────────────────────────────────────────────┐
|
|
344
|
-
│ 60 │███████████████████████████████░░████████████ │
|
|
345
|
-
│ 55 │ ████ │
|
|
346
|
-
│ 50 │ │
|
|
347
|
-
│ 45 │ │
|
|
348
|
-
│ 40 │ │
|
|
349
|
-
│ 35 │ │
|
|
350
|
-
│ 30 │ │
|
|
351
|
-
│ └──────┬──────┬──────┬──────┬──────┬────── │
|
|
352
|
-
│ 0s 10s 20s 30s 40s │
|
|
353
|
-
│ │
|
|
354
|
-
│ Statistics: │
|
|
355
|
-
│ Average FPS: 58.4 │
|
|
356
|
-
│ Minimum FPS: 52 at 0:25 │
|
|
357
|
-
│ Dropped Frames: 34 (2.5%) │
|
|
358
|
-
│ │
|
|
359
|
-
│ Frame Drops: │
|
|
360
|
-
│ [0:25] 8 frames dropped (Dashboard render) │
|
|
361
|
-
│ Impact: Minor jank noticed │
|
|
362
|
-
└────────────────────────────────────────────────────┘
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
<Tip>
|
|
366
|
-
Frame rates below 30 FPS may cause visible jank. Target 60 FPS for smooth animations and interactions.
|
|
367
|
-
</Tip>
|
|
368
|
-
|
|
369
|
-
## Resource Warnings
|
|
370
|
-
|
|
371
|
-
Performance alerts and recommendations:
|
|
372
|
-
|
|
373
|
-
```
|
|
374
|
-
Performance Warnings:
|
|
375
|
-
┌────────────────────────────────────────────────────┐
|
|
376
|
-
│ ⚠️ High CPU Usage (0:08) │
|
|
377
|
-
│ Peak: 78% for 2.3 seconds │
|
|
378
|
-
│ Cause: Heavy JavaScript execution │
|
|
379
|
-
│ Recommendation: Profile and optimize code │
|
|
380
|
-
│ │
|
|
381
|
-
│ ⚠️ Memory Increase (0:00 → 0:45) │
|
|
382
|
-
│ Growth: +800 MB during test │
|
|
383
|
-
│ Potential leak: Check event listeners │
|
|
384
|
-
│ Action: Run heap snapshot comparison │
|
|
385
|
-
│ │
|
|
386
|
-
│ ⚠️ Slow Network Request (0:21) │
|
|
387
|
-
│ Endpoint: /api/dashboard/data │
|
|
388
|
-
│ Time: 445ms (target: <200ms) │
|
|
389
|
-
│ Recommendation: Add caching or optimize query │
|
|
390
|
-
│ │
|
|
391
|
-
│ ℹ️ Frame Drops (0:25) │
|
|
392
|
-
│ Count: 8 frames │
|
|
393
|
-
│ Context: Dashboard render │
|
|
394
|
-
│ Impact: Minor visual jank │
|
|
395
|
-
│ Recommendation: Optimize render logic │
|
|
396
|
-
└────────────────────────────────────────────────────┘
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
## Performance Comparison
|
|
400
|
-
|
|
401
|
-
Compare across test runs:
|
|
402
|
-
|
|
403
|
-
```
|
|
404
|
-
Performance Comparison (Last 5 runs):
|
|
405
|
-
┌────────────────────────────────────────────────────┐
|
|
406
|
-
│ Metric Run 1 Run 2 Run 3 Run 4 Now │
|
|
407
|
-
├────────────────────────────────────────────────────┤
|
|
408
|
-
│ Avg CPU 38% 42% 35% 40% 42% │
|
|
409
|
-
│ Peak CPU 72% 78% 65% 70% 78% │
|
|
410
|
-
│ Memory End 1.9GB 2.0GB 1.7GB 1.8GB 2.0GB│
|
|
411
|
-
│ Network DL 445KB 451KB 423KB 438KB 451KB│
|
|
412
|
-
│ Test Duration 42s 45s 39s 43s 45s │
|
|
413
|
-
│ FPS Average 59 58 60 59 58 │
|
|
414
|
-
│ │
|
|
415
|
-
│ Trends: │
|
|
416
|
-
│ 📈 CPU usage increasing (↑4% vs avg) │
|
|
417
|
-
│ 📈 Memory usage increasing (↑100MB vs avg) │
|
|
418
|
-
│ → Network stable │
|
|
419
|
-
│ → Performance stable overall │
|
|
420
|
-
└────────────────────────────────────────────────────┘
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
## Export Performance Data
|
|
424
|
-
|
|
425
|
-
Download metrics for analysis:
|
|
426
|
-
|
|
427
|
-
<Tabs>
|
|
428
|
-
<Tab title="JSON">
|
|
429
|
-
```json
|
|
430
|
-
{
|
|
431
|
-
"testId": "test-123",
|
|
432
|
-
"duration": 45000,
|
|
433
|
-
"performance": {
|
|
434
|
-
"cpu": {
|
|
435
|
-
"average": 42,
|
|
436
|
-
"peak": 78,
|
|
437
|
-
"timeline": [
|
|
438
|
-
{ "time": 0, "usage": 15 },
|
|
439
|
-
{ "time": 1000, "usage": 35 },
|
|
440
|
-
{ "time": 8000, "usage": 78 }
|
|
441
|
-
]
|
|
442
|
-
},
|
|
443
|
-
"memory": {
|
|
444
|
-
"start": 1200,
|
|
445
|
-
"end": 2000,
|
|
446
|
-
"peak": 2100,
|
|
447
|
-
"growth": 800,
|
|
448
|
-
"timeline": [
|
|
449
|
-
{ "time": 0, "mb": 1200 },
|
|
450
|
-
{ "time": 10000, "mb": 1600 },
|
|
451
|
-
{ "time": 45000, "mb": 2000 }
|
|
452
|
-
]
|
|
453
|
-
},
|
|
454
|
-
"network": {
|
|
455
|
-
"downloaded": 451600,
|
|
456
|
-
"uploaded": 12300,
|
|
457
|
-
"requests": 9
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
```
|
|
462
|
-
</Tab>
|
|
463
|
-
|
|
464
|
-
<Tab title="CSV">
|
|
465
|
-
```csv
|
|
466
|
-
Time,CPU%,Memory MB,Network Down KB,Network Up KB
|
|
467
|
-
0,15,1200,0,0
|
|
468
|
-
5,35,1350,123,2
|
|
469
|
-
10,42,1600,289,5
|
|
470
|
-
15,38,1750,367,8
|
|
471
|
-
20,45,1850,401,10
|
|
472
|
-
25,72,1920,445,11
|
|
473
|
-
30,35,1980,451,12
|
|
474
|
-
45,25,2000,451,12
|
|
475
|
-
```
|
|
476
|
-
</Tab>
|
|
477
|
-
|
|
478
|
-
<Tab title="Summary Report">
|
|
479
|
-
```
|
|
480
|
-
Performance Report - Test #123
|
|
481
|
-
========================================
|
|
482
|
-
|
|
483
|
-
Test Duration: 45 seconds
|
|
484
|
-
Execution Date: 2024-01-15 14:30:12
|
|
485
|
-
|
|
486
|
-
CPU Performance:
|
|
487
|
-
- Average Usage: 42%
|
|
488
|
-
- Peak Usage: 78% at 0:08
|
|
489
|
-
- CPU Time: 18.9 seconds
|
|
490
|
-
|
|
491
|
-
Memory Usage:
|
|
492
|
-
- Starting: 1.2 GB
|
|
493
|
-
- Ending: 2.0 GB
|
|
494
|
-
- Growth: +800 MB (67%)
|
|
495
|
-
- Peak: 2.1 GB
|
|
496
|
-
|
|
497
|
-
Network Activity:
|
|
498
|
-
- Downloaded: 451.6 KB
|
|
499
|
-
- Uploaded: 12.3 KB
|
|
500
|
-
- Requests: 9 total
|
|
501
|
-
- Average Response: 183ms
|
|
502
|
-
|
|
503
|
-
Performance Issues:
|
|
504
|
-
⚠️ High CPU spike at 0:08 (78%)
|
|
505
|
-
⚠️ Memory growth +800MB
|
|
506
|
-
⚠️ Slow API: /api/dashboard (445ms)
|
|
507
|
-
|
|
508
|
-
Recommendations:
|
|
509
|
-
1. Profile JavaScript to reduce CPU usage
|
|
510
|
-
2. Investigate memory leak
|
|
511
|
-
3. Optimize slow API endpoint
|
|
512
|
-
```
|
|
513
|
-
</Tab>
|
|
514
|
-
</Tabs>
|
|
515
|
-
|
|
516
|
-
## Performance Profiling Integration
|
|
517
|
-
|
|
518
|
-
Connect with browser DevTools:
|
|
519
|
-
|
|
520
|
-
```javascript
|
|
521
|
-
import { test } from 'vitest';
|
|
522
|
-
import { chrome } from 'testdriverai/presets';
|
|
523
|
-
|
|
524
|
-
test('profile performance', async (context) => {
|
|
525
|
-
const { testdriver, page } = await chrome(context, {
|
|
526
|
-
url: 'https://example.com'
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
// Start performance profiling
|
|
530
|
-
await page.evaluate(() => {
|
|
531
|
-
performance.mark('test-start');
|
|
532
|
-
});
|
|
533
|
-
|
|
534
|
-
await testdriver.find('dashboard link').click();
|
|
535
|
-
|
|
536
|
-
// End profiling
|
|
537
|
-
await page.evaluate(() => {
|
|
538
|
-
performance.mark('test-end');
|
|
539
|
-
performance.measure('test', 'test-start', 'test-end');
|
|
540
|
-
});
|
|
541
|
-
|
|
542
|
-
// Performance metrics automatically captured in dashcam
|
|
543
|
-
});
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
**Replay Shows:**
|
|
547
|
-
```
|
|
548
|
-
Performance Marks:
|
|
549
|
-
[0:00] 🏁 test-start
|
|
550
|
-
[0:15] 🏁 test-end
|
|
551
|
-
Duration: 15.234s
|
|
552
|
-
|
|
553
|
-
User Timing:
|
|
554
|
-
Measure: test (15.234s)
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
## System Resource Alerts
|
|
558
|
-
|
|
559
|
-
Configure thresholds:
|
|
560
|
-
|
|
561
|
-
```
|
|
562
|
-
Alert Configuration:
|
|
563
|
-
┌────────────────────────────────────────────────────┐
|
|
564
|
-
│ CPU Threshold: │
|
|
565
|
-
│ ⚠️ Warning at 70% │
|
|
566
|
-
│ ❌ Critical at 90% │
|
|
567
|
-
│ │
|
|
568
|
-
│ Memory Threshold: │
|
|
569
|
-
│ ⚠️ Warning at 80% (6.4 GB / 8 GB) │
|
|
570
|
-
│ ❌ Critical at 95% (7.6 GB / 8 GB) │
|
|
571
|
-
│ │
|
|
572
|
-
│ Network Latency: │
|
|
573
|
-
│ ⚠️ Warning at 500ms │
|
|
574
|
-
│ ❌ Critical at 1000ms │
|
|
575
|
-
│ │
|
|
576
|
-
│ Frame Rate: │
|
|
577
|
-
│ ⚠️ Warning at <45 FPS │
|
|
578
|
-
│ ❌ Critical at <30 FPS │
|
|
579
|
-
└────────────────────────────────────────────────────┘
|
|
580
|
-
```
|
|
581
|
-
|
|
582
|
-
## Learn More
|
|
583
|
-
|
|
584
|
-
<CardGroup cols={2}>
|
|
585
|
-
<Card
|
|
586
|
-
title="Application Logs"
|
|
587
|
-
icon="terminal"
|
|
588
|
-
href="/v7/features/application-logs"
|
|
589
|
-
>
|
|
590
|
-
TestDriver SDK logs
|
|
591
|
-
</Card>
|
|
592
|
-
|
|
593
|
-
<Card
|
|
594
|
-
title="Browser Logs"
|
|
595
|
-
icon="browser"
|
|
596
|
-
href="/v7/features/browser-logs"
|
|
597
|
-
>
|
|
598
|
-
Console output and errors
|
|
599
|
-
</Card>
|
|
600
|
-
|
|
601
|
-
<Card
|
|
602
|
-
title="Network Monitoring"
|
|
603
|
-
icon="network-wired"
|
|
604
|
-
href="/v7/features/network-monitoring"
|
|
605
|
-
>
|
|
606
|
-
HTTP requests and responses
|
|
607
|
-
</Card>
|
|
608
|
-
|
|
609
|
-
<Card
|
|
610
|
-
title="Test Replays"
|
|
611
|
-
icon="video"
|
|
612
|
-
href="/v7/features/test-replays"
|
|
613
|
-
>
|
|
614
|
-
Complete test execution videos
|
|
615
|
-
</Card>
|
|
616
|
-
</CardGroup>
|