cbrowser 18.62.0 → 18.63.1

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.
Files changed (90) hide show
  1. package/README.md +32 -7
  2. package/dist/analysis/accessibility-empathy.d.ts.map +1 -1
  3. package/dist/analysis/accessibility-empathy.js +85 -22
  4. package/dist/analysis/accessibility-empathy.js.map +1 -1
  5. package/dist/mcp-server-remote.d.ts.map +1 -1
  6. package/dist/mcp-server-remote.js +89 -1
  7. package/dist/mcp-server-remote.js.map +1 -1
  8. package/dist/mcp-tools/base/audit-tools.d.ts.map +1 -1
  9. package/dist/mcp-tools/base/audit-tools.js +40 -2
  10. package/dist/mcp-tools/base/audit-tools.js.map +1 -1
  11. package/dist/mcp-tools/base/persona-comparison-tools.d.ts.map +1 -1
  12. package/dist/mcp-tools/base/persona-comparison-tools.js +33 -4
  13. package/dist/mcp-tools/base/persona-comparison-tools.js.map +1 -1
  14. package/dist/mcp-tools/base/site-knowledge-tools.js +1 -1
  15. package/dist/mcp-tools/base/site-knowledge-tools.js.map +1 -1
  16. package/dist/mcp-tools/index.d.ts +1 -1
  17. package/dist/mcp-tools/index.d.ts.map +1 -1
  18. package/dist/mcp-tools/index.js +1 -1
  19. package/dist/mcp-tools/index.js.map +1 -1
  20. package/package.json +1 -1
  21. package/docs/ASSESSMENT.md +0 -132
  22. package/docs/AUTH0-SETUP.md +0 -207
  23. package/docs/COGNITIVE-OPTIMAL-TRANSPORT-RESEARCH.md +0 -238
  24. package/docs/DEMO-DEPLOYMENT.md +0 -177
  25. package/docs/ENTERPRISE-INTEGRATION.md +0 -250
  26. package/docs/GETTING-STARTED.md +0 -232
  27. package/docs/INSTALL.md +0 -274
  28. package/docs/MCP-INTEGRATION.md +0 -301
  29. package/docs/METHODOLOGY.md +0 -276
  30. package/docs/PERSONA-QUESTIONNAIRE.md +0 -328
  31. package/docs/README.md +0 -45
  32. package/docs/REMOTE-MCP-SERVER.md +0 -569
  33. package/docs/SECURITY_WHITEPAPER.md +0 -475
  34. package/docs/STRESS-TEST-v16.14.4.md +0 -241
  35. package/docs/Tool-Cognitive-Journey-Autonomous.md +0 -270
  36. package/docs/Tool-Competitive-Benchmark.md +0 -293
  37. package/docs/Tool-Empathy-Audit.md +0 -331
  38. package/docs/Tool-Hunt-Bugs.md +0 -305
  39. package/docs/Tool-Marketing-Campaign.md +0 -298
  40. package/docs/Tool-Persona-Create.md +0 -274
  41. package/docs/Tools-Accessibility.md +0 -208
  42. package/docs/Tools-Browser-Automation.md +0 -311
  43. package/docs/Tools-Cognitive-Journeys.md +0 -233
  44. package/docs/Tools-Marketing-Intelligence.md +0 -271
  45. package/docs/Tools-Overview.md +0 -162
  46. package/docs/Tools-Persona-System.md +0 -300
  47. package/docs/Tools-Session-State.md +0 -278
  48. package/docs/Tools-Testing-Quality.md +0 -257
  49. package/docs/Tools-Utilities.md +0 -182
  50. package/docs/Tools-Visual-Performance.md +0 -278
  51. package/docs/hunt-bugs-coverage.md +0 -103
  52. package/docs/personas/Persona-ADHD.md +0 -141
  53. package/docs/personas/Persona-ElderlyUser.md +0 -137
  54. package/docs/personas/Persona-FirstTimer.md +0 -137
  55. package/docs/personas/Persona-ImpatientUser.md +0 -138
  56. package/docs/personas/Persona-Index.md +0 -302
  57. package/docs/personas/Persona-LowVision.md +0 -139
  58. package/docs/personas/Persona-MobileUser.md +0 -139
  59. package/docs/personas/Persona-MotorTremor.md +0 -139
  60. package/docs/personas/Persona-PowerUser.md +0 -135
  61. package/docs/personas/Persona-ScreenReaderUser.md +0 -139
  62. package/docs/research/Bibliography.md +0 -275
  63. package/docs/research/Research-Methodology.md +0 -244
  64. package/docs/research/Values-Research.md +0 -432
  65. package/docs/traits/Trait-AnchoringBias.md +0 -227
  66. package/docs/traits/Trait-AttributionStyle.md +0 -280
  67. package/docs/traits/Trait-AuthoritySensitivity.md +0 -141
  68. package/docs/traits/Trait-ChangeBlindness.md +0 -171
  69. package/docs/traits/Trait-Comprehension.md +0 -180
  70. package/docs/traits/Trait-Curiosity.md +0 -189
  71. package/docs/traits/Trait-EmotionalContagion.md +0 -144
  72. package/docs/traits/Trait-FOMO.md +0 -150
  73. package/docs/traits/Trait-Index.md +0 -166
  74. package/docs/traits/Trait-InformationForaging.md +0 -217
  75. package/docs/traits/Trait-InterruptRecovery.md +0 -249
  76. package/docs/traits/Trait-MentalModelRigidity.md +0 -228
  77. package/docs/traits/Trait-MetacognitivePlanning.md +0 -164
  78. package/docs/traits/Trait-Patience.md +0 -137
  79. package/docs/traits/Trait-Persistence.md +0 -165
  80. package/docs/traits/Trait-ProceduralFluency.md +0 -205
  81. package/docs/traits/Trait-ReadingTendency.md +0 -216
  82. package/docs/traits/Trait-Resilience.md +0 -162
  83. package/docs/traits/Trait-RiskTolerance.md +0 -162
  84. package/docs/traits/Trait-Satisficing.md +0 -181
  85. package/docs/traits/Trait-SelfEfficacy.md +0 -199
  86. package/docs/traits/Trait-SocialProofSensitivity.md +0 -155
  87. package/docs/traits/Trait-TimeHorizon.md +0 -267
  88. package/docs/traits/Trait-TransferLearning.md +0 -249
  89. package/docs/traits/Trait-TrustCalibration.md +0 -227
  90. package/docs/traits/Trait-WorkingMemory.md +0 -192
@@ -1,257 +0,0 @@
1
- > **This documentation is no longer maintained here.**
2
- >
3
- > For the latest version, please visit: **[Testing & Quality Tools](https://cbrowser.ai/docs/Tools-Testing-Quality)**
4
-
5
- ---
6
-
7
- # Testing & Quality Tools
8
-
9
- **Write tests in plain English. Let AI fix them when they break.**
10
-
11
- These 7 tools transform how you write, maintain, and debug tests. Natural language test suites, automatic repair of broken selectors, flaky test detection, and coverage mapping — all without writing a single line of test code.
12
-
13
- ---
14
-
15
- ## When to Use These Tools
16
-
17
- - **You hate writing test scripts** but need test coverage
18
- - **Your tests break constantly** when the UI changes
19
- - **You have flaky tests** that randomly pass and fail
20
- - **You don't know what's untested** and want a coverage map
21
- - **You want autonomous bug finding** without writing test cases
22
-
23
- ---
24
-
25
- ## Tools
26
-
27
- ### `nl_test_inline`
28
-
29
- **What it does**: Run tests written in plain English, passed directly as text.
30
-
31
- **Why you'd use it**: Quick validation without creating test files. Great for ad-hoc testing and CI pipelines.
32
-
33
- | Parameter | Type | Required | Description |
34
- |-----------|------|----------|-------------|
35
- | `tests` | string | Yes | Natural language test steps, one per line |
36
- | `stopOnFailure` | boolean | No | Stop at first failure. Default: false |
37
- | `screenshots` | boolean | No | Capture screenshot after each step. Default: false |
38
-
39
- **Example**:
40
- ```json
41
- {
42
- "tests": "go to https://example.com\nclick the login button\nfill email with test@example.com\nfill password with secret123\nclick submit\nverify the page contains Welcome",
43
- "screenshots": true
44
- }
45
- ```
46
-
47
- ### Test Syntax
48
-
49
- | Instruction | Examples |
50
- |-------------|----------|
51
- | **Navigate** | `go to https://...`, `navigate to https://...`, `open https://...` |
52
- | **Click** | `click the login button`, `click Submit`, `press Enter` |
53
- | **Fill** | `type "value" in email field`, `fill username with "john"` |
54
- | **Wait** | `wait 2 seconds`, `wait for "Loading" to disappear` |
55
- | **Assert** | `verify page contains "Welcome"`, `verify url contains "/home"` |
56
- | **Screenshot** | `take screenshot` |
57
-
58
- ---
59
-
60
- ### `nl_test_file`
61
-
62
- **What it does**: Run a test suite from a file. Supports multiple test blocks and better organization.
63
-
64
- **Why you'd use it**: Maintain test suites as simple text files that anyone can read and edit.
65
-
66
- | Parameter | Type | Required | Description |
67
- |-----------|------|----------|-------------|
68
- | `path` | string | Yes | Path to the test file |
69
- | `filter` | string | No | Run only tests matching this pattern |
70
- | `dryRun` | boolean | No | Parse tests without executing. Default: false |
71
-
72
- **Example**:
73
- ```json
74
- {
75
- "path": "/tests/checkout-flow.txt",
76
- "filter": "payment"
77
- }
78
- ```
79
-
80
- ### Test File Format
81
-
82
- ```txt
83
- # Test: Login Flow
84
- go to https://example.com
85
- click the login button
86
- fill email with user@example.com
87
- fill password with password123
88
- click submit
89
- verify url contains /dashboard
90
-
91
- # Test: Failed Login
92
- go to https://example.com/login
93
- fill email with wrong@example.com
94
- fill password with badpassword
95
- click submit
96
- verify page contains "Invalid credentials"
97
- ```
98
-
99
- ---
100
-
101
- ### `generate_tests`
102
-
103
- **What it does**: Analyze a page and automatically generate test scenarios covering its functionality.
104
-
105
- **Why you'd use it**: Bootstrap test coverage for a new page or discover tests you didn't think to write.
106
-
107
- | Parameter | Type | Required | Description |
108
- |-----------|------|----------|-------------|
109
- | `url` | string | Yes | Page to analyze |
110
- | `depth` | string | No | Test depth: `smoke`, `standard`, `comprehensive`. Default: `standard` |
111
- | `focus` | string | No | Focus area: `forms`, `navigation`, `errors`, `all` |
112
-
113
- **Example**:
114
- ```json
115
- {
116
- "url": "https://example.com/checkout",
117
- "depth": "comprehensive",
118
- "focus": "forms"
119
- }
120
- ```
121
-
122
- **Returns**: Generated test file content with scenarios for happy paths, edge cases, and error conditions.
123
-
124
- ---
125
-
126
- ### `repair_test`
127
-
128
- **What it does**: Automatically fix a broken test by analyzing what changed and updating selectors/assertions.
129
-
130
- **Why you'd use it**: When a test fails due to UI changes, repair it instead of rewriting it.
131
-
132
- | Parameter | Type | Required | Description |
133
- |-----------|------|----------|-------------|
134
- | `testPath` | string | Yes | Path to the broken test file |
135
- | `errorContext` | string | No | Error message or failure details |
136
- | `autoApply` | boolean | No | Apply fixes automatically. Default: false |
137
- | `verify` | boolean | No | Run repaired test to verify fix. Default: true |
138
-
139
- **Example**:
140
- ```json
141
- {
142
- "testPath": "/tests/checkout.txt",
143
- "errorContext": "Element 'Submit Order' not found",
144
- "autoApply": true
145
- }
146
- ```
147
-
148
- **Returns**: Proposed fixes, what changed, and (if verified) confirmation the repaired test passes.
149
-
150
- ---
151
-
152
- ### `detect_flaky_tests`
153
-
154
- **What it does**: Run tests multiple times to identify which ones are unreliable.
155
-
156
- **Why you'd use it**: Find tests that randomly fail so you can fix them or quarantine them.
157
-
158
- | Parameter | Type | Required | Description |
159
- |-----------|------|----------|-------------|
160
- | `testPath` | string | Yes | Test file to check |
161
- | `runs` | number | No | Number of runs. Default: 5 |
162
- | `threshold` | number | No | Failure percentage to mark as flaky. Default: 20 |
163
-
164
- **Example**:
165
- ```json
166
- {
167
- "testPath": "/tests/full-suite.txt",
168
- "runs": 10,
169
- "threshold": 10
170
- }
171
- ```
172
-
173
- **Returns**: List of flaky tests with failure rates, timing variance, and suggested fixes.
174
-
175
- ---
176
-
177
- ### `coverage_map`
178
-
179
- **What it does**: Generate a test coverage map showing which pages and features are tested.
180
-
181
- **Why you'd use it**: Find gaps in test coverage before they become bugs in production.
182
-
183
- | Parameter | Type | Required | Description |
184
- |-----------|------|----------|-------------|
185
- | `siteUrl` | string | Yes | Base URL of the site |
186
- | `testsPath` | string | Yes | Path to test files (supports glob patterns) |
187
- | `depth` | number | No | Crawl depth for discovering pages. Default: 3 |
188
-
189
- **Example**:
190
- ```json
191
- {
192
- "siteUrl": "https://example.com",
193
- "testsPath": "/tests/**/*.txt",
194
- "depth": 3
195
- }
196
- ```
197
-
198
- **Returns**: Coverage matrix showing each page, what tests cover it, and what's untested.
199
-
200
- ---
201
-
202
- ### `hunt_bugs`
203
-
204
- **What it does**: Autonomously explore a site looking for bugs, errors, and accessibility issues — without being told what to test.
205
-
206
- **Why you'd use it**: Discover issues you didn't know existed. Great for exploratory testing and security reconnaissance.
207
-
208
- | Parameter | Type | Required | Description |
209
- |-----------|------|----------|-------------|
210
- | `url` | string | Yes | Starting URL |
211
- | `scope` | string | No | Bug types: `all`, `functional`, `visual`, `accessibility`, `security` |
212
- | `depth` | number | No | Exploration depth. Default: 3 |
213
- | `maxPages` | number | No | Maximum pages to visit. Default: 20 |
214
-
215
- **Example**:
216
- ```json
217
- {
218
- "url": "https://example.com",
219
- "scope": "all",
220
- "depth": 4,
221
- "maxPages": 50
222
- }
223
- ```
224
-
225
- **Returns**: List of discovered issues with severity, reproduction steps, and screenshots.
226
-
227
- ### What `hunt_bugs` Looks For
228
-
229
- - **Functional**: Broken links, form errors, JavaScript exceptions, failed network requests
230
- - **Visual**: Layout breaks, overlapping elements, missing images, rendering issues
231
- - **Accessibility**: Missing alt text, low contrast, keyboard traps, ARIA violations
232
- - **Security**: Exposed credentials, insecure forms, missing HTTPS, data in URLs
233
-
234
- ---
235
-
236
- ## Natural Language Test Advantages
237
-
238
- | Traditional Tests | CBrowser NL Tests |
239
- |-------------------|-------------------|
240
- | `await page.click('#btn-submit-order-v3')` | `click the Submit Order button` |
241
- | Breaks when ID changes | Finds button by intent |
242
- | Requires developer to write | Anyone can write |
243
- | Hard to read for non-devs | Self-documenting |
244
- | Manual repair on failure | Auto-repair available |
245
-
246
- ---
247
-
248
- ## Related Documentation
249
-
250
- - [Natural Language Tests](/docs/Natural-Language-Tests/) — Deep dive on NL test syntax
251
- - [AI Test Repair](/docs/AI-Test-Repair/) — How repair works
252
- - [Flaky Test Detection](/docs/Flaky-Test-Detection/) — Dealing with unreliable tests
253
- - [Test Coverage Map](/docs/Test-Coverage-Map/) — Understanding coverage
254
-
255
- ---
256
-
257
- *Last updated: v17.6.0*
@@ -1,182 +0,0 @@
1
- > **This documentation is no longer maintained here.**
2
- >
3
- > For the latest version, please visit: **[Utility Tools](https://cbrowser.ai/docs/Tools-Utilities)**
4
-
5
- ---
6
-
7
- # Utility Tools
8
-
9
- **Diagnostics, health checks, and infrastructure.**
10
-
11
- These 6 tools handle diagnostics, self-healing statistics, agent-readiness audits, and API key management (Enterprise). The tools that keep everything else running smoothly.
12
-
13
- ---
14
-
15
- ## Tools
16
-
17
- ### `status`
18
-
19
- **What it does**: Get comprehensive CBrowser environment diagnostics.
20
-
21
- **Why you'd use it**: Debug configuration issues, verify installation, check capabilities.
22
-
23
- | Parameter | Type | Required | Description |
24
- |-----------|------|----------|-------------|
25
- | *none* | | | |
26
-
27
- **Returns**:
28
- - CBrowser version
29
- - Browser backend (Chromium/Firefox/WebKit)
30
- - Data directory location
31
- - Enterprise availability
32
- - Authentication status
33
- - Recent activity summary
34
-
35
- ---
36
-
37
- ### `heal_stats`
38
-
39
- **What it does**: Get statistics on the self-healing selector cache — how many selectors have been healed, hit rate, storage usage.
40
-
41
- **Why you'd use it**: Understand how well self-healing is working and whether the cache needs maintenance.
42
-
43
- | Parameter | Type | Required | Description |
44
- |-----------|------|----------|-------------|
45
- | `detailed` | boolean | No | Include per-domain breakdown. Default: false |
46
-
47
- **Returns**:
48
- - Total healed selectors
49
- - Cache hit rate
50
- - Most frequently healed selectors
51
- - Cache age and size
52
-
53
- ---
54
-
55
- ### `agent_ready_audit`
56
-
57
- **What it does**: Audit a website for AI-agent friendliness. Scores how easily an autonomous AI could navigate and interact with the site.
58
-
59
- **Why you'd use it**: Know if your site is ready for the AI agent future. Sites that score well are also easier for humans to use.
60
-
61
- | Parameter | Type | Required | Description |
62
- |-----------|------|----------|-------------|
63
- | `url` | string | Yes | URL to audit |
64
- | `depth` | number | No | Pages to crawl. Default: 5 |
65
-
66
- **Example**:
67
- ```json
68
- {
69
- "url": "https://example.com",
70
- "depth": 10
71
- }
72
- ```
73
-
74
- **Returns**:
75
- - Overall score (0-100)
76
- - Grade (A-F)
77
- - Category scores:
78
- - Semantic HTML quality
79
- - ARIA completeness
80
- - Consistent navigation
81
- - Clear form labels
82
- - Predictable interactive elements
83
- - Error message clarity
84
- - Specific recommendations
85
-
86
- ### Scoring
87
-
88
- | Grade | Score | Meaning |
89
- |-------|-------|---------|
90
- | A | 90-100 | Excellent agent compatibility |
91
- | B | 80-89 | Good, minor improvements possible |
92
- | C | 70-79 | Acceptable, some friction for agents |
93
- | D | 60-69 | Poor, significant navigation challenges |
94
- | F | <60 | Hostile to automated interaction |
95
-
96
- ---
97
-
98
- ## API Key Management 🔒 Enterprise
99
-
100
- > **All API key tools require CBrowser Enterprise.**
101
- > API keys enable autonomous cognitive journeys that make AI decisions without human orchestration.
102
-
103
- ### `set_api_key` 🔒 Enterprise
104
-
105
- **What it does**: Store an Anthropic API key in encrypted session memory for autonomous journey execution.
106
-
107
- **Why you'd use it**: Enable `cognitive_journey_autonomous` and other features that require AI decision-making.
108
-
109
- | Parameter | Type | Required | Description |
110
- |-----------|------|----------|-------------|
111
- | `api_key` | string | Yes | Your Anthropic API key (starts with `sk-ant-`) |
112
-
113
- **Security**: Keys are stored in memory only, not persisted to disk. They're cleared when the session ends.
114
-
115
- ---
116
-
117
- ### `clear_api_key` 🔒 Enterprise
118
-
119
- **What it does**: Remove the stored API key from session memory.
120
-
121
- **Why you'd use it**: Clear credentials when you're done or before switching accounts.
122
-
123
- | Parameter | Type | Required | Description |
124
- |-----------|------|----------|-------------|
125
- | *none* | | | |
126
-
127
- ---
128
-
129
- ### `api_key_status` 🔒 Enterprise
130
-
131
- **What it does**: Check if an API key is currently stored without revealing the key itself.
132
-
133
- **Why you'd use it**: Verify setup before running autonomous operations.
134
-
135
- | Parameter | Type | Required | Description |
136
- |-----------|------|----------|-------------|
137
- | *none* | | | |
138
-
139
- **Returns**:
140
- - Key stored: yes/no
141
- - Key prefix (first 8 chars, masked)
142
- - When stored (timestamp)
143
-
144
- ---
145
-
146
- ### `get_api_key_prompt` 🔒 Enterprise
147
-
148
- **What it does**: Get instructions for obtaining an Anthropic API key.
149
-
150
- **Why you'd use it**: Help users who need to set up API access.
151
-
152
- | Parameter | Type | Required | Description |
153
- |-----------|------|----------|-------------|
154
- | *none* | | | |
155
-
156
- **Returns**: Step-by-step instructions for creating an Anthropic account and generating an API key.
157
-
158
- ---
159
-
160
- ## Demo vs Enterprise
161
-
162
- | Tool | Demo | Enterprise |
163
- |------|------|------------|
164
- | `status` | ✅ | ✅ |
165
- | `heal_stats` | ✅ | ✅ |
166
- | `agent_ready_audit` | ✅ | ✅ |
167
- | `set_api_key` | ❌ | ✅ |
168
- | `clear_api_key` | ❌ | ✅ |
169
- | `api_key_status` | ❌ | ✅ |
170
- | `get_api_key_prompt` | ❌ | ✅ |
171
-
172
- ---
173
-
174
- ## Related Documentation
175
-
176
- - [Tools Overview](/docs/Tools-Overview/) — All tools by category
177
- - [MCP Server](/docs/MCP-Server/) — Running CBrowser locally
178
- - [Remote MCP Server](/docs/Remote-MCP-Server/) — Cloud deployment
179
-
180
- ---
181
-
182
- *Last updated: v17.6.0*
@@ -1,278 +0,0 @@
1
- > **This documentation is no longer maintained here.**
2
- >
3
- > For the latest version, please visit: **[Visual & Performance Tools](https://cbrowser.ai/docs/Tools-Visual-Performance)**
4
-
5
- ---
6
-
7
- # Visual & Performance Tools
8
-
9
- **Catch regressions before your users see them.**
10
-
11
- These 10 tools detect visual changes, performance degradation, cross-browser rendering differences, and responsive layout breakage. Stop finding out about broken deploys from customer complaints.
12
-
13
- ---
14
-
15
- ## When to Use These Tools
16
-
17
- - **You're deploying to staging** and want to verify nothing visual broke
18
- - **Performance matters** and you need to catch slowdowns before production
19
- - **Your site looks different in Safari** and you need to know exactly what's wrong
20
- - **Mobile layouts keep breaking** and you want automated viewport testing
21
- - **You want chaos engineering** to test resilience under failure conditions
22
-
23
- ---
24
-
25
- ## Tools
26
-
27
- ### `visual_baseline`
28
-
29
- **What it does**: Capture a visual baseline (screenshot + metadata) for a URL to compare against later.
30
-
31
- **Why you'd use it**: Establish what "correct" looks like so you can detect when it changes.
32
-
33
- | Parameter | Type | Required | Description |
34
- |-----------|------|----------|-------------|
35
- | `url` | string | Yes | URL to capture |
36
- | `name` | string | Yes | Name for this baseline |
37
- | `viewport` | object | No | Width/height. Default: 1280x720 |
38
- | `fullPage` | boolean | No | Capture entire page. Default: false |
39
-
40
- **Example**:
41
- ```json
42
- {
43
- "url": "https://example.com",
44
- "name": "homepage-desktop",
45
- "viewport": { "width": 1920, "height": 1080 },
46
- "fullPage": true
47
- }
48
- ```
49
-
50
- ---
51
-
52
- ### `visual_regression`
53
-
54
- **What it does**: Compare current page state against a saved baseline using AI visual analysis.
55
-
56
- **Why you'd use it**: Detect meaningful visual changes while ignoring irrelevant differences (timestamps, ads, dynamic content).
57
-
58
- | Parameter | Type | Required | Description |
59
- |-----------|------|----------|-------------|
60
- | `url` | string | Yes | URL to test |
61
- | `baseline` | string | Yes | Baseline name to compare against |
62
- | `threshold` | number | No | Difference tolerance (0-100). Default: 5 |
63
-
64
- **Example**:
65
- ```json
66
- {
67
- "url": "https://staging.example.com",
68
- "baseline": "homepage-desktop"
69
- }
70
- ```
71
-
72
- **Returns**: Pass/fail, difference percentage, annotated diff image, list of changed regions.
73
-
74
- ---
75
-
76
- ### `ab_comparison`
77
-
78
- **What it does**: Compare two different URLs visually — staging vs production, old design vs new design.
79
-
80
- **Why you'd use it**: Side-by-side comparison when you don't have a saved baseline, or when comparing different implementations.
81
-
82
- | Parameter | Type | Required | Description |
83
- |-----------|------|----------|-------------|
84
- | `urlA` | string | Yes | First URL (e.g., production) |
85
- | `urlB` | string | Yes | Second URL (e.g., staging) |
86
- | `labelA` | string | No | Label for first URL. Default: "A" |
87
- | `labelB` | string | No | Label for second URL. Default: "B" |
88
- | `viewport` | object | No | Viewport dimensions |
89
-
90
- **Example**:
91
- ```json
92
- {
93
- "urlA": "https://example.com/pricing",
94
- "urlB": "https://staging.example.com/pricing",
95
- "labelA": "Production",
96
- "labelB": "Staging"
97
- }
98
- ```
99
-
100
- **Returns**: Side-by-side comparison, diff overlay, list of differences.
101
-
102
- ---
103
-
104
- ### `perf_baseline`
105
-
106
- **What it does**: Capture performance baseline (Core Web Vitals, load times, resource counts) for a URL.
107
-
108
- **Why you'd use it**: Know what your current performance is so you can detect regressions.
109
-
110
- | Parameter | Type | Required | Description |
111
- |-----------|------|----------|-------------|
112
- | `url` | string | Yes | URL to measure |
113
- | `name` | string | Yes | Baseline name |
114
- | `runs` | number | No | Number of measurements to average. Default: 3 |
115
-
116
- **Example**:
117
- ```json
118
- {
119
- "url": "https://example.com",
120
- "name": "homepage-perf",
121
- "runs": 5
122
- }
123
- ```
124
-
125
- **Returns**: LCP, FCP, TTFB, CLS, total load time, resource breakdown, with "good/needs-improvement/poor" ratings.
126
-
127
- ---
128
-
129
- ### `perf_regression`
130
-
131
- **What it does**: Compare current performance against a baseline with configurable sensitivity.
132
-
133
- **Why you'd use it**: Catch performance regressions before they ship.
134
-
135
- | Parameter | Type | Required | Description |
136
- |-----------|------|----------|-------------|
137
- | `url` | string | Yes | URL to test |
138
- | `baseline` | string | Yes | Baseline name |
139
- | `profile` | string | No | Sensitivity: `strict`, `normal`, `lenient`. Default: `normal` |
140
- | `thresholdLcp` | number | No | LCP regression threshold %. Default: 20 |
141
- | `thresholdFcp` | number | No | FCP regression threshold %. Default: 20 |
142
-
143
- **Example**:
144
- ```json
145
- {
146
- "url": "https://staging.example.com",
147
- "baseline": "homepage-perf",
148
- "profile": "strict"
149
- }
150
- ```
151
-
152
- **Returns**: Pass/fail, metric comparisons, which thresholds were exceeded.
153
-
154
- ---
155
-
156
- ### `list_baselines`
157
-
158
- **What it does**: List all saved visual and performance baselines.
159
-
160
- **Why you'd use it**: See what baselines exist before running regression tests.
161
-
162
- | Parameter | Type | Required | Description |
163
- |-----------|------|----------|-------------|
164
- | `type` | string | No | Filter: `visual`, `performance`, `all`. Default: `all` |
165
-
166
- ---
167
-
168
- ### `cross_browser_test`
169
-
170
- **What it does**: Render a page in Chromium, Firefox, and WebKit and compare the results.
171
-
172
- **Why you'd use it**: Find browser-specific rendering bugs.
173
-
174
- | Parameter | Type | Required | Description |
175
- |-----------|------|----------|-------------|
176
- | `url` | string | Yes | URL to test |
177
- | `browsers` | array | No | Browsers to test. Default: `["chromium", "firefox", "webkit"]` |
178
- | `viewport` | object | No | Viewport dimensions |
179
-
180
- **Example**:
181
- ```json
182
- {
183
- "url": "https://example.com/complex-layout",
184
- "browsers": ["chromium", "webkit"]
185
- }
186
- ```
187
-
188
- **Returns**: Screenshots from each browser, diff analysis, list of rendering differences.
189
-
190
- ---
191
-
192
- ### `cross_browser_diff`
193
-
194
- **What it does**: Quick comparison of key metrics (layout, fonts, colors) across browsers without full screenshots.
195
-
196
- **Why you'd use it**: Faster browser comparison when you just need to know if there are issues.
197
-
198
- | Parameter | Type | Required | Description |
199
- |-----------|------|----------|-------------|
200
- | `url` | string | Yes | URL to compare |
201
- | `browsers` | array | No | Browsers to test |
202
-
203
- ---
204
-
205
- ### `responsive_test`
206
-
207
- **What it does**: Test page rendering across different viewport sizes (mobile, tablet, desktop).
208
-
209
- **Why you'd use it**: Catch responsive layout breakage.
210
-
211
- | Parameter | Type | Required | Description |
212
- |-----------|------|----------|-------------|
213
- | `url` | string | Yes | URL to test |
214
- | `viewports` | array | No | Viewport presets or custom sizes. Default: `["mobile", "tablet", "desktop"]` |
215
-
216
- **Example**:
217
- ```json
218
- {
219
- "url": "https://example.com",
220
- "viewports": ["mobile", "tablet", "desktop-lg"]
221
- }
222
- ```
223
-
224
- ### Viewport Presets
225
-
226
- | Preset | Dimensions |
227
- |--------|------------|
228
- | `mobile` | 375x667 |
229
- | `tablet` | 768x1024 |
230
- | `desktop` | 1280x720 |
231
- | `desktop-lg` | 1920x1080 |
232
-
233
- **Returns**: Screenshots at each viewport, flagged layout issues, overflow problems.
234
-
235
- ---
236
-
237
- ### `chaos_test`
238
-
239
- **What it does**: Inject failures to test site resilience — offline mode, network latency, blocked resources.
240
-
241
- **Why you'd use it**: Ensure your site degrades gracefully under adverse conditions.
242
-
243
- | Parameter | Type | Required | Description |
244
- |-----------|------|----------|-------------|
245
- | `url` | string | Yes | URL to test |
246
- | `chaos` | string | Yes | Type: `offline`, `slow-network`, `block-scripts`, `block-images`, `block-fonts` |
247
- | `duration` | number | No | How long to apply chaos (seconds). Default: 10 |
248
-
249
- **Example**:
250
- ```json
251
- {
252
- "url": "https://example.com/checkout",
253
- "chaos": "slow-network"
254
- }
255
- ```
256
-
257
- **Returns**: How the page behaves under stress, errors encountered, recovery behavior.
258
-
259
- ---
260
-
261
- ## Sensitivity Profiles for Performance
262
-
263
- | Profile | LCP | FCP | TTFB | Use Case |
264
- |---------|-----|-----|------|----------|
265
- | `strict` | 10% | 10% | 15% | Pre-production, critical paths |
266
- | `normal` | 20% | 20% | 25% | Regular CI/CD |
267
- | `lenient` | 35% | 35% | 40% | Early development, high variance |
268
-
269
- ---
270
-
271
- ## Related Documentation
272
-
273
- - [Performance Regression](/docs/Performance-Regression/) — Deep dive on perf testing
274
- - [Tools Overview](/docs/Tools-Overview/) — All tools by category
275
-
276
- ---
277
-
278
- *Last updated: v17.6.0*