Skip to content

Add jqwik property-based testing for JTD validation #88

@simbo1905

Description

@simbo1905

Summary

  • add into module JtdPropertyTest property-based integration test that exercises exhaustive schema/document permutations
  • implement sealed-schema generators, compliant document builders, and negative case creation with JUL logging for traceability
  • register a jqwik ArbitraryProvider to drive exhaustive GenerationMode coverage

Testing

  • ./mvnw -pl json-java21-jtd verify -Djava.util.logging.ConsoleHandler.level=INFO

Implementation Details

  • Add jqwik dependency to json-java21-jtd module
  • Create JtdPropertyTest class with property-based tests
  • Implement custom ArbitraryProvider for JTD schema generation
  • Create generators for all 8 JTD schema forms (Empty, Ref, Type, Enum, Elements, Properties, Values, Discriminator)
  • Build compliant JSON document generators for each schema type
  • Implement negative case generation to test validation failures
  • Add comprehensive JUL logging for test traceability
  • Ensure exhaustive GenerationMode coverage for thorough testing

Acceptance Criteria

  • Property-based tests run successfully with jqwik
  • All 8 JTD schema forms are covered by generators
  • Both positive and negative test cases are generated
  • JUL logging provides clear traceability of test execution
  • Tests integrate with existing maven build process

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions