Skip to content

Commit ca3f5bc

Browse files
authored
Add visual testing framework and refactor progress bar analysis (#63)
* feat(visual-testing): Add visual testing framework for azd progress bars - Introduced a comprehensive visual testing suite to capture terminal outputs at various widths. - Implemented scripts for capturing outputs, running Playwright tests, and generating reports. - Created HTML renderer for terminal outputs and integrated ANSI color support. - Added metadata generation for captured outputs and duplicate detection logic. - Developed a visual comparison page to facilitate easy inspection of results. - Included troubleshooting steps and common tasks in documentation for user guidance. * Remove outdated visual testing documentation and add comprehensive port manager configuration and visual testing architecture details * docs: Add terminal display information for progress bars in CLI reference * Refactor visual testing suite into progress bar analysis framework - Removed visual testing documentation and related files (quick-start.md, architecture.md, server.js, terminal.html). - Updated metadata.json to reflect new capture filenames and timestamps. - Renamed package.json to reflect new purpose and updated dependencies. - Simplified playwright.config.ts by removing unnecessary configurations. - Modified run-visual-tests.ps1 to focus on analysis rather than visual testing. - Updated progress-bars.spec.ts to analyze terminal outputs instead of rendering them visually. - Introduced new helper functions for resource management in service/helpers.go. - Implemented WebSocket health monitoring in dashboard/websocket.go. - Enhanced security measures in portmanager and validation files. - Streamlined logging across the application for consistency and clarity. - Improved performance by removing browser dependencies and reducing test execution time. - Added comprehensive refactoring summary in refactoring-depstable.md.
1 parent 641db6d commit ca3f5bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1293
-764
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ tests/**/.azure/cache/
103103
tests/projects/node/test-pnpm-project/azure.yaml
104104
tests/projects/python/test-uv-project/azure.yaml
105105
tests/projects/aspire-test/azure.yaml
106+
106107
cli2/jongio.azd.app/build.ps1
107108
cli2/jongio.azd.app/build.sh
108109
cli2/jongio.azd.app/changelog.md

cli/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -356,25 +356,24 @@ azd-app-extension/
356356
│ └── azure/
357357

358358
├── docs/ # Documentation
359-
│ ├── cli-reference.md
360-
│ ├── environment-variables.md
361-
│ ├── environment-variables-quick-reference.md
362-
│ ├── commands/
359+
│ ├── cli-reference.md # User-facing: CLI reference
360+
│ ├── environment-variables.md # User-facing: Environment variable configuration
361+
│ ├── ports.md # User-facing: Port configuration
362+
│ ├── commands/ # User-facing: Command documentation
363363
│ │ ├── reqs.md
364364
│ │ ├── deps.md
365365
│ │ ├── run.md
366366
│ │ ├── logs.md
367367
│ │ ├── info.md
368368
│ │ └── version.md
369-
│ ├── dev/
369+
│ ├── schema/ # User-facing: Schema documentation
370+
│ │ └── azure.yaml.md
371+
│ ├── dev/ # Developer-only: Internal implementation docs
370372
│ │ ├── azd-context-inheritance.md
371-
│ │ ├── environment-variables.md
372373
│ │ ├── testing.md
373374
│ │ └── release.md
374-
│ ├── design/
375-
│ │ └── ports.md
376-
│ └── schema/
377-
│ └── azure.yaml.md
375+
│ └── design/ # Developer-only: Design documents
376+
│ └── ports.md
378377
├── .github/
379378
│ └── workflows/
380379
│ ├── ci.yml # CI pipeline

cli/docs/cli-reference.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ All commands automatically inherit azd environment context when run through `azd
88

99
See [dev/azd-context-inheritance.md](dev/azd-context-inheritance.md) for details on accessing azd environment variables.
1010

11+
### Terminal Display
12+
13+
Progress bars automatically adapt to terminal width. Narrow terminals (<70 columns) use compact mode to prevent line wrapping.
14+
1115
### Global Flags
1216

1317
These flags are available for all commands:

cli/docs/commands/deps.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ azd app deps
2121

2222
### Flags
2323

24-
This command has no additional flags. It automatically detects and installs dependencies for all projects.
24+
| Flag | Short | Type | Default | Description |
25+
|------|-------|------|---------|-------------|
26+
| `--verbose` | `-v` | bool | `false` | Show full installation output |
27+
| `--clean` | | bool | `false` | Remove existing dependencies before installing (clears node_modules, .venv, etc.) |
28+
| `--no-cache` | | bool | `false` | Force fresh dependency installation and bypass cached results |
29+
| `--force` | `-f` | bool | `false` | Force clean reinstall (combines --clean and --no-cache) |
2530

2631
## Execution Flow
2732

cli/docs/commands/version.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,18 @@ Example: 0.5.1
5959

6060
```bash
6161
$ azd app version
62-
azd app extension version 0.5.1
62+
azd app extension
63+
Version: 0.5.1
64+
Built: 2024-11-04T10:00:00Z
6365
```
6466

65-
### JSON Output (future)
67+
### JSON Output
6668

6769
```bash
6870
$ azd app version --output json
6971
{
7072
"version": "0.5.1",
71-
"commit": "abc1234",
72-
"buildDate": "2024-11-04T10:00:00Z"
73+
"buildTime": "2024-11-04T10:00:00Z"
7374
}
7475
```
7576

@@ -79,7 +80,9 @@ $ azd app version --output json
7980

8081
```bash
8182
$ azd app version
82-
azd app extension version 0.5.1
83+
azd app extension
84+
Version: 0.5.1
85+
Built: 2024-11-04T10:00:00Z
8386
```
8487

8588
### 2. Verify Installation
@@ -89,7 +92,9 @@ $ which azd-app
8992
/usr/local/bin/azd-app
9093

9194
$ azd app version
92-
azd app extension version 0.5.1
95+
azd app extension
96+
Version: 0.5.1
97+
Built: 2024-11-04T10:00:00Z
9398
```
9499

95100
### 3. Troubleshooting
@@ -98,7 +103,9 @@ When reporting issues, include version information:
98103

99104
```bash
100105
$ azd app version
101-
azd app extension version 0.5.1
106+
azd app extension
107+
Version: 0.5.1
108+
Built: 2024-11-04T10:00:00Z
102109

103110
# Include in bug report
104111
```
@@ -114,7 +121,9 @@ azd version 1.5.0
114121

115122
# Check azd app version
116123
$ azd app version
117-
azd app extension version 0.5.1
124+
azd app extension
125+
Version: 0.5.1
126+
Built: 2024-11-04T10:00:00Z
118127
```
119128

120129
## Version Compatibility
@@ -146,7 +155,9 @@ The extension is designed to be compatible with:
146155

147156
```bash
148157
$ azd app version
149-
azd app extension version 0.5.1
158+
azd app extension
159+
Version: 0.5.1
160+
Built: 2024-11-04T10:00:00Z
150161
```
151162

152163
### Example 2: In Scripts
@@ -170,5 +181,7 @@ echo "Using azd app version: $VERSION"
170181
```bash
171182
$ azd version && azd app version
172183
azd version 1.5.0
173-
azd app extension version 0.5.1
184+
azd app extension
185+
Version: 0.5.1
186+
Built: 2024-11-04T10:00:00Z
174187
```

cli/docs/dev/environment-variables-quick-reference.md

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)