Skip to content

test: expand fixture-based integration tests to cover front-end migration scenarios #209

Backlog

Description

@emmambd

Context

The validator currently has fixture-based tests that run without secrets or live network access. But fixture coverage is minimal: one feed per GBFS version (v1.0 through v3.1-RC3), focused on schema validation happy paths. One CLI test also makes a live request to invalid.example.com to exercise error handling.

As the front end migrates from the Node.js validator to the Java validator, minimal test coverage is a liability. The migration eliminates an entire class of Node.js runtime bugs (like the Lambda handler regression in gbfs-validator#222 (MobilityData/gbfs-validator#222)), but introduces a different risk: behavioral differences in validation output, error formatting, or edge case handling that the current test suite would not surface.

Proposed changes

  • Expand src/test/resources/fixtures/ to ~25 GBFS feeds covering real-world edge cases: feeds with missing optional files, feeds with cross-file reference errors, feeds across authentication types, and feeds that exercise known historical validation bugs
  • Add integration tests with exact assertions on validator output for each fixture, not just "zero errors" but specific notice types, counts, and
    affected fields
  • Replace the live invalid.example.com request in GbfsValidatorCliIntegrationTest with a WireMock or local fixture equivalent
  • Document which fixture covers which scenario so regressions are traceable

Goal

Any behavioral difference between the Node.js and Java validators on a known feed should produce a test failure before merge, not a production incident after the front-end migration ships.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions