[Dart] Improve test coverage & CI enforcement - #699
Open
Fried-man wants to merge 12 commits into
Open
Conversation
- Updated `generateMessages` to utilize a new `generateMessagesWithParser` function for improved parsing. - Introduced `GherkinDocumentParser` type for better type safety. - Renamed `_pickleStepType` to `pickleStepType` for consistency. - Enhanced `GherkinDocumentBuilder` by exposing `transformNode` method. - Added tests for parser error handling and step type assignment.
Fried-man
marked this pull request as draft
August 25, 2026 02:08
Fried-man
marked this pull request as ready for review
August 25, 2026 02:38
mpkorstanje
requested changes
Aug 31, 2026
mpkorstanje
left a comment
Member
There was a problem hiding this comment.
No. Please only writing meaning full tests and accept a coverage ratio below 100%.
I didn't review everything because you're using generative AI. Please extrapolate from these highlights:
- Don't use
testdata/{good,bad}. That's for the acceptance tests, don't duplicate them. - Don't duplicate functionality already covered by the acceptance tests.
transformNodeshouldn't be made public just for testing, nor should it be be tested in isolation. Though I don't think it needs coverage at all based on the previous point.
Contributor
Author
What minimum coverage requirement would you prefer? |
Fried-man
marked this pull request as draft
August 31, 2026 22:04
Member
|
It's up to you to work out what can be reasonably achieved without duplicating the acceptance tests. For reference, in Java, excluding the generated parser, I've got 95% of instructions covered and 83% of all branches. But you shouldn't expect similar numbers because the structure of Dart is meaningfully different. |
Fried-man
marked this pull request as ready for review
September 1, 2026 00:31
Contributor
Author
|
The public API surface is now completely unmodified. The behavior is the same too. |
mpkorstanje
self-requested a review
September 3, 2026 09:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 What's changed?
The dart solution now has full line coverage via unit test by:
Also, the dart CI now enforces full line coverage.
⚡️ What's your motivation?
Outside of best practices, the low line coverage was brought up in this issue.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
N/A
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.