# Test Results Directory

This directory contains test execution results, performance metrics, screenshots, and video recordings from Slidev E2E testing.

## Directory Structure

```
test-results/
├── README.md                          # This file
├── performance-metrics.json           # Performance test data (when executed)
├── concurrent-load-results.json       # Concurrent test data (when executed)
├── e2e-test-summary.json             # E2E test results (when executed)
├── screenshots/                       # Test failure screenshots
│   └── .gitkeep                      # (populated during test execution)
└── videos/                            # Test execution recordings
    └── .gitkeep                      # (populated during test execution)
```

## Files

### performance-metrics.json

Contains results from `pnpm run test:performance` including:
- Build times
- GitHub Pages publish times
- Total generation times
- Control command latencies
- Page load times
- Success rates

### concurrent-load-results.json

Contains results from `pnpm run test:concurrent` including:
- Total concurrent requests
- Successful/failed requests
- Success rate
- Performance under load
- GitHub Pages concurrent publishing results

### e2e-test-summary.json

Contains results from Playwright E2E tests including:
- Happy path test results
- Error handling test results
- Browser compatibility test results
- Test duration
- Failure details

### screenshots/

Contains screenshots captured during test failures:
- Named with timestamp and test name
- Organized by test suite
- Includes full-page screenshots

### videos/

Contains video recordings of test execution:
- Recorded on test failure
- Shows exact sequence of events leading to failure
- Useful for debugging visual issues

## Usage

### After Running Tests

Test results are automatically saved to this directory when you run:

```bash
# Performance tests
pnpm run test:performance > test-results/performance-output.txt

# Concurrent tests
pnpm run test:concurrent > test-results/concurrent-output.txt

# E2E tests
pnpm test:e2e
# Results saved to test-results/ by Playwright
```

### Viewing Results

**Playwright HTML Report:**
```bash
pnpm test:e2e:report
```

**Performance Metrics:**
```bash
cat test-results/performance-metrics.json | jq
```

**Test Screenshots:**
```bash
open test-results/screenshots/
```

**Test Videos:**
```bash
open test-results/videos/
```

## Retention Policy

- Test results are kept for inspection and debugging
- Screenshots and videos should be reviewed after test runs
- Cleanup old results periodically to save space
- Consider archiving results for historical tracking

## Notes

- This directory is excluded from git (via .gitignore)
- Results are local to each test execution environment
- For CI/CD, results are uploaded as artifacts
- See `docs/testing/slidev-e2e-report.md` for comprehensive test analysis
