Skip to content

Add Kotest schema property testing - #4421

Open
andimarek wants to merge 1 commit into
masterfrom
codex/kotest-schema-property-testing
Open

Add Kotest schema property testing#4421
andimarek wants to merge 1 commit into
masterfrom
codex/kotest-schema-property-testing

Conversation

@andimarek

@andimarek andimarek commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

  • add Kotest 6.2.3 through its BOM and JUnit 5 runner
  • port Viaduct schema name, type, relationship, and schema generators to graphql-java native types
  • generate native input literals and defaults with oneOf, nullability, list coercion, and cycle handling
  • generate applied directives while preventing invalid directive dependency cycles
  • add product-level properties for schema validation, exact SDL round trips, defaults, input cycles, oneOf inputs, coercion, and introspection exclusions

Testing

  • ./gradlew test --tests graphql.schema.property.*
  • ./gradlew testWithJava11 --tests graphql.schema.property.*
  • ./gradlew testWithJava17 --tests graphql.schema.property.*
  • ./gradlew testWithJava21 --tests graphql.schema.property.*
  • ./gradlew test (5,730 tests on Java 25)

Provenance

The package README links Airbnb Viaduct, the exact core/shared/arbitrary module and commit e91e45f1976d7311729af32d48fcd4aab8652516, and records the Apache-2.0 provenance.

Port Airbnb Viaduct's arbitrary GraphQL schema support to graphql-java native schema and AST types. Cover generated schema validity, SDL round trips, defaults, input cycles, oneOf inputs, coercion, and applied directives with Kotest properties.
@andimarek
andimarek force-pushed the codex/kotest-schema-property-testing branch from 2f2b616 to cb80946 Compare July 31, 2026 23:36
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5920 (+17 🟢) 5864 (+17 🟢) 0 (±0) 0 (±0) 56 (±0)
Java 17 5920 (+17 🟢) 5863 (+17 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 21 5920 (+17 🟢) 5863 (+17 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 25 5920 (+17 🟢) 5863 (+17 🟢) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 23712 (+68 🟢) 23485 (+68 🟢) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 29714 3116 90.5% ±0.0%
Branches 8726 1524 85.1% +0.1% 🟢
Methods 7946 1202 86.9% +0.1% 🟢

Changed Class Coverage (9 classes)

Class Line Branch Method
g.s.GraphQLInputObjectField +1.8% 🟢 ±0.0% +3.4% 🟢
g.s.GraphQLInputObjectType +1.8% 🟢 ±0.0% +3.1% 🟢
g.s.GraphQLInterfaceType +1.6% 🟢 ±0.0% +3.4% 🟢
g.s.GraphQLList +3.8% 🟢 ±0.0% +8.3% 🟢
g.s.GraphQLUnionType +1.8% 🟢 ±0.0% +3.8% 🟢
g.s.i.SchemaGeneratorHelper +0.6% 🟢 +1.1% 🟢 ±0.0%
g.s.i.SchemaPrinter ±0.0% +0.4% 🟢 ±0.0%
g.s.ShallowTypeRefCollector +1.4% 🟢 +2.2% 🟢 ±0.0%
g.u.TraverserVisitorStub +33.3% 🟢 ±0.0% +33.3% 🟢

Full HTML report: build artifact jacoco-html-report

Updated: 2026-07-31 23:47:10 UTC

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant