You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BiDiGenerator (#17777) has no tests of its own. Its coverage is indirect: a generator branch is exercised only when one of the generated types that happens to use it has a per-type test. That is how the integer-valued enum (emulation.MediaFeaturesGrid), the inline-union NumberValue.value check, null list elements in serializeExpr, the scalar-union path (input.Origin), and the empty NodeProperties.Attributes class (#18106) all shipped untested.
Add a BiDiGeneratorTest modelled on the Python generator tests in #18052: feed small inline schema nodes to the generator's emit functions and assert on the emitted source, one test per branch. Use real schema fragments as the oracle rather than mocks. Start with the cases above, then cover record, enum, union, alias, list and map emission, required/optional/nullable fields, const handling, and extensible records.
Ruby already tests its CDP generator (cdp_client_generator_spec.rb); Python is adding BiDi generator tests in #18052. Java should not be the one binding whose generator is untested.
Having worked on the Python generator tests in #18052, relying only on generated classes is how edge cases like null list elements in serializeExpr slipped through unnoticed. Feeding small inline schema fragments directly to BiDiGenerator makes it much faster to pinpoint generator branch logic without needing to compile the full generated binding suite.
Activity
nvborisenko commentedon Oct 8, 2026
IMHO it is easier to use generated stuff, instead of covering generator..
tanaysiabobette26 commentedon Oct 10, 2026
Having worked on the Python generator tests in #18052, relying only on generated classes is how edge cases like null list elements in
serializeExprslipped through unnoticed. Feeding small inline schema fragments directly toBiDiGeneratormakes it much faster to pinpoint generator branch logic without needing to compile the full generated binding suite.[java] Add BiDi generator tests (SeleniumHQ#18162)
github-actions commentedon Nov 21, 2026
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.