cursorflow 2.2.8__tar.gz → 2.2.9__tar.gz

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 (52) hide show
  1. {cursorflow-2.2.8 → cursorflow-2.2.9}/MANIFEST.in +8 -11
  2. {cursorflow-2.2.8 → cursorflow-2.2.9}/PKG-INFO +4 -13
  3. {cursorflow-2.2.8 → cursorflow-2.2.9}/README.md +2 -11
  4. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow.egg-info/SOURCES.txt +2 -3
  5. cursorflow-2.2.9/docs/user/USAGE_GUIDE.md +515 -0
  6. cursorflow-2.2.9/examples/hot_reload_css_iteration.py +353 -0
  7. {cursorflow-2.2.8 → cursorflow-2.2.9}/pyproject.toml +2 -2
  8. cursorflow-2.2.8/FIRST_TIME_SETUP.md +0 -215
  9. cursorflow-2.2.8/POST_INSTALL_MESSAGE.txt +0 -29
  10. cursorflow-2.2.8/docs/USER_MANUAL.md +0 -1248
  11. {cursorflow-2.2.8 → cursorflow-2.2.9}/LICENSE +0 -0
  12. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/__init__.py +0 -0
  13. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/auto_init.py +0 -0
  14. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/auto_updater.py +0 -0
  15. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/cli.py +0 -0
  16. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/action_validator.py +0 -0
  17. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/agent.py +0 -0
  18. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/auth_handler.py +0 -0
  19. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/browser_controller.py +0 -0
  20. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/browser_engine.py +0 -0
  21. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/config_validator.py +0 -0
  22. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/css_iterator.py +0 -0
  23. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/cursor_integration.py +0 -0
  24. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/cursorflow.py +0 -0
  25. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/error_context_collector.py +0 -0
  26. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/error_correlator.py +0 -0
  27. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/event_correlator.py +0 -0
  28. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/file_change_monitor.py +0 -0
  29. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/hmr_detector.py +0 -0
  30. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/log_collector.py +0 -0
  31. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/log_monitor.py +0 -0
  32. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/mockup_comparator.py +0 -0
  33. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/persistent_session.py +0 -0
  34. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/report_generator.py +0 -0
  35. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/core/trace_manager.py +0 -0
  36. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/install_cursorflow_rules.py +0 -0
  37. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/log_sources/local_file.py +0 -0
  38. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/log_sources/ssh_remote.py +0 -0
  39. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/post_install.py +0 -0
  40. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/rules/__init__.py +0 -0
  41. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/rules/cursorflow-installation.mdc +0 -0
  42. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/rules/cursorflow-usage.mdc +0 -0
  43. {cursorflow-2.2.8 → cursorflow-2.2.9}/cursorflow/updater.py +0 -0
  44. {cursorflow-2.2.8 → cursorflow-2.2.9}/examples/comprehensive_screenshot_example.py +0 -0
  45. {cursorflow-2.2.8 → cursorflow-2.2.9}/examples/enhanced_screenshot_example.py +0 -0
  46. {cursorflow-2.2.8 → cursorflow-2.2.9}/examples/mockup_comparison_example.py +0 -0
  47. {cursorflow-2.2.8 → cursorflow-2.2.9}/examples/opensas_example.py +0 -0
  48. {cursorflow-2.2.8 → cursorflow-2.2.9}/examples/react_example.py +0 -0
  49. {cursorflow-2.2.8 → cursorflow-2.2.9}/examples/responsive_testing_example.py +0 -0
  50. {cursorflow-2.2.8 → cursorflow-2.2.9}/examples/v2_comprehensive_demo.py +0 -0
  51. {cursorflow-2.2.8 → cursorflow-2.2.9}/setup.cfg +0 -0
  52. {cursorflow-2.2.8 → cursorflow-2.2.9}/setup.py +0 -0
@@ -6,30 +6,27 @@ include README.md
6
6
  include LICENSE
7
7
  include pyproject.toml
8
8
  include setup.py
9
- include FIRST_TIME_SETUP.md
10
- include POST_INSTALL_MESSAGE.txt
11
9
 
12
10
  # INCLUDE: Core package code (automatically included by setuptools)
13
11
  recursive-include cursorflow *.py
14
12
 
15
- # INCLUDE: Essential examples for users
13
+ # INCLUDE: Essential examples for users (all examples)
16
14
  include examples/react_example.py
17
15
  include examples/opensas_example.py
18
16
  include examples/mockup_comparison_example.py
19
17
  include examples/comprehensive_screenshot_example.py
20
18
  include examples/enhanced_screenshot_example.py
21
19
  include examples/responsive_testing_example.py
20
+ include examples/hot_reload_css_iteration.py
22
21
  include examples/v2_comprehensive_demo.py
23
22
 
24
- # INCLUDE: Single comprehensive user manual
25
- include docs/USER_MANUAL.md
23
+ # INCLUDE: Customer-facing documentation
24
+ include docs/user/USAGE_GUIDE.md
26
25
 
27
- # EXCLUDE: Development and internal documentation
28
- exclude docs/README.md
29
- exclude docs/development/*
30
- exclude docs/product/*
31
- exclude docs/api/*
32
- exclude docs/examples/*
26
+ # EXCLUDE: All other documentation (internal use only)
27
+ recursive-exclude docs *
28
+ # But re-include the usage guide
29
+ include docs/user/USAGE_GUIDE.md
33
30
 
34
31
  # EXCLUDE: Development files and directories
35
32
  exclude .gitignore
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cursorflow
3
- Version: 2.2.8
3
+ Version: 2.2.9
4
4
  Summary: 🔥 Complete page intelligence for AI-driven development with Hot Reload Intelligence - captures DOM, network, console, performance, HMR events, and comprehensive page analysis
5
5
  Author-email: GeekWarrior Development <rbush@cooltheory.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/haley-marketing-group/cursorflow
8
- Project-URL: Documentation, https://cursorflow.readthedocs.io
8
+ Project-URL: Documentation, https://cursorflow.dev
9
9
  Project-URL: Repository, https://github.com/haley-marketing-group/cursorflow
10
10
  Keywords: ui-testing,automation,cursor,ai,web-testing,css-iteration,hot-reload,hmr,element-intelligence,page-analysis,error-context
11
11
  Classifier: Development Status :: 5 - Production/Stable
@@ -397,14 +397,6 @@ cursorflow update
397
397
 
398
398
  ## 🧠 Why This Matters
399
399
 
400
- ### **For Job Board v4 Testing:**
401
- ✅ **Real API response times** from `/ajax_rq.smpl?fn=gjapi_typeahead`
402
- ✅ **Actual network failures** when they occur
403
- ✅ **Real browser console errors** from production code
404
- ✅ **Genuine performance metrics** under real load
405
-
406
- ❌ **With mocking:** You'd never know the typeahead is slow in production!
407
-
408
400
  ### **For Any Web Application:**
409
401
  - **Trust your test results** - they reflect actual behavior
410
402
  - **Find real performance bottlenecks** - no artificial speed boosts
@@ -427,9 +419,8 @@ cursorflow update
427
419
 
428
420
  ## 📖 Documentation
429
421
 
430
- - **[Complete User Manual](docs/USER_MANUAL.md)** - Full feature guide
431
- - **[Examples](examples/)** - Practical usage examples
432
- - **[API Reference](docs/api/)** - Complete Python API documentation
422
+ - **[Usage Guide](docs/user/USAGE_GUIDE.md)** - Complete usage documentation (included in pip install)
423
+ - **[Examples](examples/)** - Practical usage examples (included in pip install)
433
424
 
434
425
  ## 🎪 The CursorFlow Advantage
435
426
 
@@ -352,14 +352,6 @@ cursorflow update
352
352
 
353
353
  ## 🧠 Why This Matters
354
354
 
355
- ### **For Job Board v4 Testing:**
356
- ✅ **Real API response times** from `/ajax_rq.smpl?fn=gjapi_typeahead`
357
- ✅ **Actual network failures** when they occur
358
- ✅ **Real browser console errors** from production code
359
- ✅ **Genuine performance metrics** under real load
360
-
361
- ❌ **With mocking:** You'd never know the typeahead is slow in production!
362
-
363
355
  ### **For Any Web Application:**
364
356
  - **Trust your test results** - they reflect actual behavior
365
357
  - **Find real performance bottlenecks** - no artificial speed boosts
@@ -382,9 +374,8 @@ cursorflow update
382
374
 
383
375
  ## 📖 Documentation
384
376
 
385
- - **[Complete User Manual](docs/USER_MANUAL.md)** - Full feature guide
386
- - **[Examples](examples/)** - Practical usage examples
387
- - **[API Reference](docs/api/)** - Complete Python API documentation
377
+ - **[Usage Guide](docs/user/USAGE_GUIDE.md)** - Complete usage documentation (included in pip install)
378
+ - **[Examples](examples/)** - Practical usage examples (included in pip install)
388
379
 
389
380
  ## 🎪 The CursorFlow Advantage
390
381
 
@@ -1,7 +1,5 @@
1
- FIRST_TIME_SETUP.md
2
1
  LICENSE
3
2
  MANIFEST.in
4
- POST_INSTALL_MESSAGE.txt
5
3
  README.md
6
4
  pyproject.toml
7
5
  setup.py
@@ -37,9 +35,10 @@ cursorflow/log_sources/ssh_remote.py
37
35
  cursorflow/rules/__init__.py
38
36
  cursorflow/rules/cursorflow-installation.mdc
39
37
  cursorflow/rules/cursorflow-usage.mdc
40
- docs/USER_MANUAL.md
38
+ docs/user/USAGE_GUIDE.md
41
39
  examples/comprehensive_screenshot_example.py
42
40
  examples/enhanced_screenshot_example.py
41
+ examples/hot_reload_css_iteration.py
43
42
  examples/mockup_comparison_example.py
44
43
  examples/opensas_example.py
45
44
  examples/react_example.py
@@ -0,0 +1,515 @@
1
+ # Universal CursorFlow - Usage Guide
2
+
3
+ ## 🌌 **Built for the Universe**
4
+
5
+ This testing framework adapts to **any web architecture** - use the same commands and concepts whether you're testing legacy Perl systems, modern React apps, or anything in between.
6
+
7
+ ## 📋 **Action Format Reference**
8
+
9
+ ### **Valid Action Formats**
10
+
11
+ CursorFlow supports multiple action formats for flexibility:
12
+
13
+ **Simple format (action type as key):**
14
+ ```json
15
+ {"navigate": "/dashboard"}
16
+ {"click": ".button"}
17
+ {"wait": 2}
18
+ {"screenshot": "page-loaded"}
19
+ ```
20
+
21
+ **Configuration format (action with options):**
22
+ ```json
23
+ {"click": {"selector": ".button"}}
24
+ {"fill": {"selector": "#username", "value": "test@example.com"}}
25
+ {"wait_for": {"selector": ".loaded", "timeout": 5000}}
26
+ ```
27
+
28
+ **Explicit type format (for programmatic generation):**
29
+ ```json
30
+ {"type": "click", "selector": ".button"}
31
+ {"type": "fill", "selector": "#email", "value": "user@test.com"}
32
+ ```
33
+
34
+ ### **Supported Action Types**
35
+
36
+ **CursorFlow-specific:**
37
+ - `navigate` - Navigate to URL or path
38
+ - `screenshot` - Capture screenshot with comprehensive data
39
+ - `authenticate` - Use authentication handler
40
+
41
+ **Any Playwright Page method works:**
42
+ - `click`, `dblclick`, `hover`, `tap`
43
+ - `fill`, `type`, `press`
44
+ - `check`, `uncheck`, `select_option`
45
+ - `focus`, `blur`
46
+ - `drag_and_drop`
47
+ - `wait_for_selector`, `wait_for_load_state`, `wait_for_timeout`
48
+ - `goto`, `reload`, `go_back`, `go_forward`
49
+ - `evaluate`, `route`, `expose_function`
50
+ - And 80+ more Playwright methods
51
+
52
+ **Full API:** https://playwright.dev/python/docs/api/class-page
53
+
54
+ **Pass-Through Architecture:** CursorFlow provides smart defaults but doesn't limit you. Any Playwright Page method works, and you can configure ANY browser/context option. This makes CursorFlow forward-compatible with future Playwright releases.
55
+
56
+ **Configuration Pass-Through:**
57
+ ```json
58
+ {
59
+ "browser_config": {
60
+ "browser_launch_options": {
61
+ "devtools": true,
62
+ "channel": "chrome",
63
+ "proxy": {"server": "http://proxy:3128"}
64
+ }
65
+ },
66
+ "context_options": {
67
+ "color_scheme": "dark",
68
+ "geolocation": {"latitude": 40.7128, "longitude": -74.0060},
69
+ "timezone_id": "America/New_York"
70
+ }
71
+ }
72
+ ```
73
+
74
+ See Playwright docs for all options:
75
+ - Browser: https://playwright.dev/python/docs/api/class-browsertype#browser-type-launch
76
+ - Context: https://playwright.dev/python/docs/api/class-browser#browser-new-context
77
+
78
+ ### **Complete Workflow Example**
79
+
80
+ ```json
81
+ [
82
+ {"navigate": "/login"},
83
+ {"wait_for": "#login-form"},
84
+ {"fill": {"selector": "#username", "value": "admin"}},
85
+ {"fill": {"selector": "#password", "value": "pass123"}},
86
+ {"click": "#submit-button"},
87
+ {"wait_for": ".dashboard"},
88
+ {"screenshot": "logged-in"},
89
+ {"validate": {"selector": ".error", "exists": false}}
90
+ ]
91
+ ```
92
+
93
+ ## 🚀 **CLI Commands**
94
+
95
+ ### **Testing Commands**
96
+
97
+ **Basic test:**
98
+ ```bash
99
+ cursorflow test --base-url http://localhost:3000 --path /page
100
+ ```
101
+
102
+ **Inline actions:**
103
+ ```bash
104
+ cursorflow test --base-url http://localhost:3000 \
105
+ --path /login \
106
+ --wait-for "#login-form" \
107
+ --fill "#username=admin" \
108
+ --fill "#password=secret" \
109
+ --click "#submit" \
110
+ --screenshot "logged-in" \
111
+ --show-console \
112
+ --open-trace
113
+ ```
114
+
115
+ **Wait strategies:**
116
+ ```bash
117
+ --wait-for ".selector" # Wait for element
118
+ --wait-timeout 60 # Timeout in seconds
119
+ --wait-for-network-idle # Wait for no network activity
120
+ ```
121
+
122
+ **Output options:**
123
+ ```bash
124
+ --show-console # Show errors and warnings
125
+ --show-all-console # Show all console messages
126
+ --open-trace # Auto-open Playwright trace
127
+ --quiet # JSON output only
128
+ ```
129
+
130
+ ### **Authenticated Session Management**
131
+
132
+ **Requires auth_config** - Session persistence is designed for testing authenticated pages.
133
+
134
+ **Configure authentication in `.cursorflow/config.json`:**
135
+ ```json
136
+ {
137
+ "base_url": "http://localhost:3000",
138
+ "auth": {
139
+ "method": "form",
140
+ "username": "test@example.com",
141
+ "password": "testpass",
142
+ "username_selector": "#email",
143
+ "password_selector": "#password",
144
+ "submit_selector": "#login-button",
145
+ "session_storage": ".cursorflow/sessions/"
146
+ }
147
+ }
148
+ ```
149
+
150
+ **Then use session save/restore:**
151
+ ```bash
152
+ # Login once and save session
153
+ cursorflow test --base-url http://localhost:3000 \
154
+ --path /login \
155
+ --save-session "authenticated"
156
+ # AuthHandler logs in, saves cookies + localStorage + sessionStorage
157
+
158
+ # Reuse saved session (skip login)
159
+ cursorflow test --base-url http://localhost:3000 \
160
+ --path /dashboard \
161
+ --use-session "authenticated"
162
+ # AuthHandler restores saved state, already logged in
163
+
164
+ # Manage sessions
165
+ cursorflow sessions list
166
+ cursorflow sessions delete "name"
167
+ ```
168
+
169
+ **Authentication Methods:**
170
+ - `form` - Username/password form submission
171
+ - `cookies` - Pre-configured cookies
172
+ - `headers` - HTTP header authentication (Bearer tokens, etc.)
173
+
174
+ **Without auth_config:** Session flags will be ignored (testing public pages doesn't need session persistence).
175
+
176
+ ### **Quick Commands**
177
+
178
+ **Rerun last test:**
179
+ ```bash
180
+ cursorflow rerun
181
+ cursorflow rerun --click ".other-element"
182
+ ```
183
+
184
+ **Inspect elements:**
185
+ ```bash
186
+ cursorflow inspect --base-url http://localhost:3000 --selector ".message-item"
187
+ cursorflow count --base-url http://localhost:3000 --selector ".message-item"
188
+ ```
189
+
190
+ **View timeline:**
191
+ ```bash
192
+ cursorflow timeline --session session_12345
193
+ ```
194
+
195
+ ### **Artifact Management**
196
+
197
+ CursorFlow generates screenshots, traces, and session data. Clean up regularly:
198
+
199
+ **Clean old artifacts (>7 days):**
200
+ ```bash
201
+ cursorflow cleanup --artifacts --old-only --yes
202
+ ```
203
+
204
+ **Clean everything:**
205
+ ```bash
206
+ cursorflow cleanup --all --yes
207
+ ```
208
+
209
+ **Preview first:**
210
+ ```bash
211
+ cursorflow cleanup --all --dry-run
212
+ ```
213
+
214
+ **Best practices:**
215
+ - Run `cleanup --artifacts --old-only --yes` weekly
216
+ - Always use `--yes` for autonomous/CI operation
217
+ - Use `--dry-run` to preview before deleting
218
+ - Clean sessions periodically: `cleanup --sessions --yes`
219
+
220
+ **Typical growth:** 50-100MB/day light usage, 500MB-1GB/day heavy usage
221
+
222
+ ## ⚡ **Quick Usage Examples**
223
+
224
+ ### **OpenSAS/Mod_Perl (Our Current Project)**
225
+ ```bash
226
+ # Test message console with staging server logs
227
+ cursor-test test message-console \
228
+ --framework mod_perl \
229
+ --base-url https://staging.resumeblossom.com \
230
+ --logs ssh \
231
+ --params orderid=6590532419829
232
+
233
+ # Auto-detect and test
234
+ cd /path/to/opensas
235
+ cursor-test auto-test --environment staging
236
+ ```
237
+
238
+ ### **React Application**
239
+ ```bash
240
+ # Test React dashboard with local logs
241
+ cursor-test test user-dashboard \
242
+ --framework react \
243
+ --base-url http://localhost:3000 \
244
+ --logs local \
245
+ --params userId=123
246
+
247
+ # Test Next.js app
248
+ cursor-test test admin-panel \
249
+ --framework react \
250
+ --base-url http://localhost:3000 \
251
+ --workflows auth,data_load,interaction
252
+ ```
253
+
254
+ ### **PHP/Laravel System**
255
+ ```bash
256
+ # Test with Docker container logs
257
+ cursor-test test admin-users \
258
+ --framework php \
259
+ --base-url https://app.example.com \
260
+ --logs docker \
261
+ --params token=abc123
262
+ ```
263
+
264
+ ### **Django Application**
265
+ ```bash
266
+ # Test with systemd logs
267
+ cursor-test test blog-editor \
268
+ --framework django \
269
+ --base-url http://localhost:8000 \
270
+ --logs systemd \
271
+ --params postId=456
272
+ ```
273
+
274
+ ## 🔧 **Installation & Setup**
275
+
276
+ ### **1. Install the Framework**
277
+ ```bash
278
+ # Install universal testing agent
279
+ pip install cursorflow
280
+ playwright install chromium
281
+
282
+ # Or install from source
283
+ git clone /path/to/cursorflow
284
+ cd cursorflow
285
+ pip install -e .
286
+ ```
287
+
288
+ ### **2. Initialize Any Project**
289
+ ```bash
290
+ # Auto-detect framework and create config
291
+ cursor-test init . --framework auto-detect
292
+
293
+ # Or specify framework manually
294
+ cursor-test init . --framework mod_perl
295
+ cursor-test init . --framework react
296
+ cursor-test init . --framework php
297
+ ```
298
+
299
+ ### **3. Configure for Your Environment**
300
+ Edit the generated `cursor-test-config.json`:
301
+
302
+ ```json
303
+ {
304
+ "framework": "mod_perl",
305
+ "environments": {
306
+ "local": {
307
+ "base_url": "http://localhost:8080",
308
+ "logs": "local",
309
+ "log_paths": {"app": "logs/app.log"}
310
+ },
311
+ "staging": {
312
+ "base_url": "https://staging.example.com",
313
+ "logs": "ssh",
314
+ "ssh_config": {
315
+ "hostname": "staging-server",
316
+ "username": "deploy",
317
+ "key_filename": "~/.ssh/staging_key"
318
+ },
319
+ "log_paths": {
320
+ "apache_error": "/var/log/httpd/error_log"
321
+ }
322
+ }
323
+ }
324
+ }
325
+ ```
326
+
327
+ ## 📋 **Common Test Patterns**
328
+
329
+ ### **Smoke Testing (Any Framework)**
330
+ ```bash
331
+ # Test basic functionality
332
+ cursor-test test component-name --workflows smoke_test
333
+
334
+ # Test all components
335
+ cursor-test auto-test
336
+ ```
337
+
338
+ ### **Debugging Specific Issues**
339
+ ```bash
340
+ # Test with verbose logging
341
+ cursor-test test component-name --verbose --workflows load,ajax,interaction
342
+
343
+ # Focus on specific functionality
344
+ cursor-test test message-console --workflows modal_test --params orderid=123
345
+ ```
346
+
347
+ ### **Performance Testing**
348
+ ```bash
349
+ # Monitor performance during test
350
+ cursor-test test dashboard --workflows load,data_refresh --capture-performance
351
+
352
+ # Continuous monitoring
353
+ cursor-test monitor critical-component --interval 300
354
+ ```
355
+
356
+ ## 🎯 **Framework-Specific Features**
357
+
358
+ ### **Mod_Perl/OpenSAS Features**
359
+ - **AJAX Authentication**: Automatically handles pid/hash/timestamp
360
+ - **Component Loading**: Waits for OpenSAS component initialization
361
+ - **Perl Error Detection**: Recognizes compilation errors, missing functions
362
+ - **Database Error Correlation**: Matches DBD::mysql errors with actions
363
+
364
+ ### **React Features**
365
+ - **Component Mounting**: Waits for React component lifecycle
366
+ - **State Management**: Monitors Redux/Context state changes
367
+ - **API Integration**: Tracks fetch requests and responses
368
+ - **Hydration Detection**: Identifies SSR hydration issues
369
+
370
+ ### **PHP Features**
371
+ - **Laravel Routing**: Handles Laravel route patterns
372
+ - **Eloquent Errors**: Detects ORM and database issues
373
+ - **Blade Templates**: Monitors template rendering errors
374
+ - **Session Management**: Tracks authentication state
375
+
376
+ ## 📊 **Understanding Test Results**
377
+
378
+ ### **Success Indicators**
379
+ - `✅ PASSED` - All workflows completed without critical issues
380
+ - Low error count in correlations
381
+ - No failed network requests
382
+ - Performance metrics within acceptable ranges
383
+
384
+ ### **Failure Indicators**
385
+ - `❌ FAILED` - Critical issues found or workflows failed
386
+ - High correlation confidence between browser actions and server errors
387
+ - Console errors or failed network requests
388
+ - Performance degradation
389
+
390
+ ### **Report Sections**
391
+ 1. **Test Summary** - Overview of test execution
392
+ 2. **Critical Issues** - Problems requiring immediate attention
393
+ 3. **Recommendations** - Suggested fixes and improvements
394
+ 4. **Workflow Results** - Step-by-step execution details
395
+ 5. **Performance Metrics** - Timing and resource usage
396
+ 6. **Debug Information** - Raw data for deep debugging
397
+
398
+ ## 🛠️ **Advanced Usage**
399
+
400
+ ### **Custom Test Definitions**
401
+ Create `test_definitions/component-name.yaml`:
402
+
403
+ ```yaml
404
+ my_component:
405
+ framework: react # or mod_perl, php, django
406
+
407
+ workflows:
408
+ custom_workflow:
409
+ - navigate: {params: {id: "123"}}
410
+ - wait_for: "[data-testid='loaded']"
411
+ - click: {selector: "#action-button"}
412
+ - validate: {selector: ".success", exists: true}
413
+
414
+ assertions:
415
+ - selector: "#main-content"
416
+ not_empty: true
417
+ - api_response: "/api/data"
418
+ status: 200
419
+ ```
420
+
421
+ ### **Programmatic Usage**
422
+ ```python
423
+ from cursor_testing_agent import TestAgent
424
+
425
+ # Any framework with same API
426
+ agent = TestAgent('react', 'http://localhost:3000', logs='local')
427
+ results = await agent.test('user-dashboard', {'userId': '123'})
428
+
429
+ # Chain multiple tests
430
+ components = ['login', 'dashboard', 'profile']
431
+ for component in components:
432
+ result = await agent.test(component)
433
+ if not result['success']:
434
+ print(f"❌ {component} failed")
435
+ break
436
+ ```
437
+
438
+ ### **Integration with CI/CD**
439
+ ```yaml
440
+ # .github/workflows/ui-tests.yml
441
+ - name: Run UI Tests
442
+ run: |
443
+ cursor-test auto-test --environment staging
444
+ cursor-test test critical-component --workflows full
445
+ ```
446
+
447
+ ## 🔍 **Troubleshooting**
448
+
449
+ ### **Common Issues**
450
+ - **SSH Connection Failed**: Check SSH config and key permissions
451
+ - **Log Files Not Found**: Verify log paths exist and are readable
452
+ - **Browser Launch Failed**: Reinstall Playwright browsers
453
+ - **Framework Not Detected**: Manually specify framework with `--framework`
454
+
455
+ ### **Debug Commands**
456
+ ```bash
457
+ # Test SSH connection
458
+ ssh deploy@staging-server "echo test"
459
+
460
+ # Verify log files
461
+ ssh deploy@staging-server "tail -5 /var/log/httpd/error_log"
462
+
463
+ # Test browser automation
464
+ python -c "from cursor_testing_agent import TestAgent; print('✅ Import successful')"
465
+ ```
466
+
467
+ ## 🎯 **Best Practices**
468
+
469
+ ### **For Any Framework**
470
+ 1. **Start with smoke tests** to catch basic issues
471
+ 2. **Use environment-specific configs** for different deployment stages
472
+ 3. **Monitor logs during active development** to catch issues early
473
+ 4. **Create custom workflows** for your specific user journeys
474
+
475
+ ### **For Team Usage**
476
+ 1. **Share config files** across team members
477
+ 2. **Standardize test definitions** for consistency
478
+ 3. **Use in CI/CD pipelines** for automated quality gates
479
+ 4. **Generate reports** for debugging sessions
480
+
481
+ ## 🚀 **Scaling Across Projects**
482
+
483
+ ### **Single Developer, Multiple Projects**
484
+ ```bash
485
+ # Same tool, different projects
486
+ cd /path/to/react-project && cursor-test auto-test
487
+ cd /path/to/opensas-project && cursor-test auto-test
488
+ cd /path/to/laravel-project && cursor-test auto-test
489
+ ```
490
+
491
+ ### **Team with Mixed Tech Stack**
492
+ ```bash
493
+ # Everyone uses same commands regardless of tech stack
494
+ cursor-test test login-component # Works for React
495
+ cursor-test test message-console # Works for Mod_Perl
496
+ cursor-test test admin-panel # Works for PHP
497
+ ```
498
+
499
+ **The power**: Learn once, test everywhere! 🌌
500
+
501
+ ## 💡 **Success Stories**
502
+
503
+ **Scenario 1**: Debug OpenSAS AJAX issues
504
+ - **Before**: Manual clicking + SSH terminal + guesswork
505
+ - **After**: `cursor-test test message-console` → automatic correlation + fix recommendations
506
+
507
+ **Scenario 2**: Test React component across environments
508
+ - **Before**: Manual testing on local, staging, production
509
+ - **After**: `cursor-test test component --environment staging` → consistent testing everywhere
510
+
511
+ **Scenario 3**: Onboard new team member
512
+ - **Before**: Complex setup docs for each framework
513
+ - **After**: `cursor-test init .` → auto-configured testing for any project
514
+
515
+ **The vision**: Universal testing that scales across frameworks, environments, and teams! 🚀✨