mirror of
https://github.com/LukeHagar/aperture.git
synced 2025-12-06 04:19:09 +00:00
2.3 KiB
2.3 KiB
Aperture Extension Test Scenarios
This document outlines the test scenarios for the Aperture VS Code extension.
Test Scenarios
1. Root Spec Validation
- Valid:
examples/openapi-3.2.yaml,examples/openapi-3.1.yaml,examples/swagger-2.0.yaml - Invalid:
examples/invalid-missing-info.yaml- Should show error: "OpenAPI document must contain an 'info' section"
2. Schema Naming Validation
- Invalid:
examples/invalid-schema-naming.yaml- Should show warnings for schema names not in PascalCase
petshould bePet
3. Operation ID Validation
- Invalid:
examples/invalid-duplicate-operation-id.yaml- Should show warning for duplicate
operationId: listPets
- Should show warning for duplicate
4. Path Parameter Validation
- Invalid:
examples/invalid-path-parameters.yaml- Should show warnings for undeclared path parameters
{petId}and{ownerId}
- Should show warnings for undeclared path parameters
5. Version Detection
- Test with different OpenAPI versions (3.2, 3.1, 3.0, 2.0)
- Test with
versionPreference: "auto"vs forced versions - Test with invalid version strings
6. Settings Configuration
- Test
openapiLsp.versionPreferencesetting - Test
openapiLsp.enableTypeProfilesetting - Test
openapiLsp.enableCustomRulessetting - Test
openapiLsp.maxFileSizesetting - Test
openapiLsp.debounceDelaysetting
7. Performance Testing
- Test with large files (>5MB)
- Test debouncing behavior
- Test cache performance
- Test memory usage
8. Multi-file Validation
- Test
$refresolution across multiple files - Test circular reference detection
- Test file watching and re-validation
9. Hover and IntelliSense
- Test hover information on schema properties
- Test completion suggestions
- Test validation messages
10. Error Handling
- Test with malformed JSON/YAML
- Test with network timeouts
- Test with missing dependencies
Running Tests
- Install the extension in VS Code
- Open the example files
- Verify that diagnostics appear in the Problems panel
- Test hover functionality
- Test settings changes
- Test with different file sizes
Expected Results
- Valid files should show no errors
- Invalid files should show appropriate error messages
- Hover should provide helpful information
- Settings should be respected
- Performance should be smooth even with large files