docs: add tests/ folder convention for test output
This commit is contained in:
16
.gitignore
vendored
16
.gitignore
vendored
@@ -9,7 +9,21 @@ build
|
|||||||
/sandbox-test/test_results.json
|
/sandbox-test/test_results.json
|
||||||
|
|
||||||
# Test output files
|
# Test output files
|
||||||
screenshot_*.png
|
/tests/
|
||||||
|
*.png
|
||||||
test_*.json
|
test_*.json
|
||||||
test_*.txt
|
test_*.txt
|
||||||
test_*.log
|
test_*.log
|
||||||
|
*_hierarchy.json
|
||||||
|
recorded_actions.json
|
||||||
|
|
||||||
|
# Duplicate asset folders (use src/main/assets/ instead)
|
||||||
|
/icons/
|
||||||
|
/scripts/
|
||||||
|
/ui/
|
||||||
|
|
||||||
|
# Sandbox data created during testing
|
||||||
|
/src/main/assets/sandbox_data/
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
NUL
|
||||||
|
|||||||
@@ -337,6 +337,37 @@ mosis-designer.exe --simulator --test-apps base-apps \
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Test Output Directory
|
||||||
|
|
||||||
|
All test files and output should be placed in the `tests/` folder at the project root:
|
||||||
|
|
||||||
|
```
|
||||||
|
MosisService/
|
||||||
|
└── tests/
|
||||||
|
├── test_navigation.json # Test action files
|
||||||
|
├── test_settings.json
|
||||||
|
├── screenshot_home.png # Screenshot output
|
||||||
|
├── screenshot_settings.png
|
||||||
|
├── hierarchy.json # Hierarchy dumps
|
||||||
|
└── recorded_actions.json # Recorded actions
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run test with output to tests/ folder
|
||||||
|
mosis-designer.exe --simulator --test-apps base-apps \
|
||||||
|
--playback tests/test_navigation.json \
|
||||||
|
--screenshot-after tests/screenshot_result.png \
|
||||||
|
--hierarchy tests/hierarchy.json
|
||||||
|
```
|
||||||
|
|
||||||
|
This keeps the project root clean and organizes all testing artifacts in one place.
|
||||||
|
|
||||||
|
**Note**: The `tests/` folder is gitignored - test outputs are not committed to version control.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
### Tap not registering
|
### Tap not registering
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
# UI Test Files
|
|
||||||
|
|
||||||
This directory contains JSON action playback tests for the Mosis Designer.
|
|
||||||
|
|
||||||
## Running Tests
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# From designer/build directory
|
|
||||||
./Release/mosis-designer.exe --simulator --test-apps base-apps \
|
|
||||||
--playback ../../tests/test_settings.json \
|
|
||||||
--screenshot-after ../../tests/screenshots/result.png
|
|
||||||
```
|
|
||||||
|
|
||||||
## Test Files
|
|
||||||
|
|
||||||
| File | Description |
|
|
||||||
|------|-------------|
|
|
||||||
| `test_home_only.json` | Wait and capture home screen |
|
|
||||||
| `test_settings.json` | Navigate to Settings app |
|
|
||||||
| `test_browser.json` | Navigate to Browser (dock) |
|
|
||||||
| `test_messages.json` | Navigate to Messages app |
|
|
||||||
| `test_messages_v2.json` | Messages with corrected coordinates |
|
|
||||||
| `test_music.json` | Navigate to Music app |
|
|
||||||
| `test_store.json` | Navigate to Mosis Store |
|
|
||||||
| `test_navigation.json` | Multi-app navigation sequence |
|
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||
Captured screenshots are in `screenshots/`:
|
|
||||||
- `screenshot_home_fresh.png` - Home screen
|
|
||||||
- `screenshot_browser.png` - Browser app
|
|
||||||
- `screenshot_messages_fixed.png` - Messages app
|
|
||||||
- `screenshot_music_fixed.png` - Music app
|
|
||||||
- `screenshot_settings_fixed.png` - Settings app
|
|
||||||
- `screenshot_store_fixed.png` - Mosis Store
|
|
||||||
|
|
||||||
## Hierarchy Dumps
|
|
||||||
|
|
||||||
- `hierarchy_fresh.json` - Full UI element tree with bounds
|
|
||||||
- `hierarchy_dump.json` - Previous hierarchy capture
|
|
||||||
|
|
||||||
Use hierarchy dumps to find element coordinates for new tests.
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
Before running tests with `base-apps`, ensure shared assets exist at `MosisService/` root:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Copy shared assets (run from MosisService/)
|
|
||||||
cp -r src/main/assets/ui .
|
|
||||||
cp -r src/main/assets/scripts .
|
|
||||||
cp -r src/main/assets/icons .
|
|
||||||
```
|
|
||||||
|
|
||||||
See `docs/TESTING-FRAMEWORK.md` for full documentation.
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB |
Reference in New Issue
Block a user