Test to fill a testing gap in NameExpression.#3002
Open
labkey-danield wants to merge 2 commits into
Open
Conversation
Rewrote helper methods to be more flexible and not make as many assumptions of test data. Use regular expression for the validation of sample names generated from the NameExpression.
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.
Rationale
Using Claude to identify an automation gap in name expression.
I tried to use Claude to generate new test automation that would cover the scenario but the existing helper code was old and had too many assumptions to use as is. I would not have felt comfortable having Claude rewrite that helper.
Claude identified this testing gap:
${Inputs/Type/Field}generic parent (sample OR data)NameGenerator.java:172— SubstitutionValue.Inputs enumNameGenerator.java:851-854— isParentInputToken matches INPUT_PARENTNameGeneratorState.java:386-389— addParentLookupValues adds to Inputs FKTo cover this code a name expression must have a generic "Inputs" and a field name. Example:
Gen-${Inputs/FieldB:defaultValue('none')}-${genId}
The gap in NameGeneratorState.addParentLookupValues before the new test:

Coverage with the new test:

Related Pull Requests
Changes