Skip to content

Validate: Test Coverage and Quality Metrics #15

@Sam-Bolling

Description

@Sam-Bolling

Overview

Validate the claims made in the assessment document about SensorML Validation (src/ogc-api/csapi/validation/sensorml-validator.ts).

📖 Tip: Use the Validation Prompt Template to work through this issue systematically.

Claims to Validate

Schema-Based Validation

  • Async validation against OGC JSON schemas from schemas.opengis.net
  • Process type validation:
    • validateSensorMLProcess() - PhysicalSystem, PhysicalComponent, SimpleProcess, AggregateProcess
    • validateDeployment() - Deployment metadata
    • validateDerivedProperty() - Property derivations

Features

  • JSON Schema compliance checking using Ajv
  • Schema caching for performance
  • Format validation (email, uri, date-time)
  • Required properties enforcement
  • Type-specific validation rules

Known Limitations

  • SensorML validation not yet integrated into parsers (mentioned in assessment)
  • Type definitions complete, validator exists, but integration pending

Validation Tasks

1. Locate the Code

  • Find src/ogc-api/csapi/validation/sensorml-validator.ts
  • Document file size and structure
  • Identify all exported validator functions

2. Examine Validator Implementation

  • Review schema loading/caching logic
  • Examine Ajv integration
  • Document validation process for each type
  • Check schema URL references
  • Extract key code snippets

3. Test Validator

  • Test with valid SensorML data (PhysicalSystem, PhysicalComponent, etc.)
  • Test with invalid SensorML data
  • Verify schema fetching works
  • Check schema caching behavior
  • Test format validation (email, uri, date-time)

4. Verify Integration Status

  • Check if validator is used in parsers
  • Confirm integration status matches assessment claim
  • Document what needs to be done for full integration

5. Verify Tests

  • Locate SensorML validator test files
  • Count actual number of tests
  • Review test coverage
  • Document test categories
  • Extract example tests

Deliverable

Create a detailed validation report in this issue showing:

  1. Code Location: File path and structure
  2. Validator Functions: List of all validators with signatures
  3. Schema Integration: How Ajv and OGC schemas are used
  4. Validation Process: Step-by-step how validation works
  5. Code Samples: Key implementation snippets
  6. Schema URLs: What schemas are referenced
  7. Integration Status: Current state vs. assessment claim
  8. Test Location: Where the tests are located
  9. Test Samples: Example tests
  10. Test Results: Actual test count and coverage
  11. Validation Verdict: ✅ Confirmed / ⚠️ Partially Confirmed / ❌ Not Confirmed for each claim

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions