-
Notifications
You must be signed in to change notification settings - Fork 2
TestGen generating performance comparative tests (#93) #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alexgarzao
wants to merge
21
commits into
main
Choose a base branch
from
93-testgen-generating-cmp-perf-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 12 changed files in this pull request and generated 4 comments.
leocavalcante
approved these changes
Oct 31, 2025
fabriciogpp
approved these changes
Oct 31, 2025
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.
This PR introduces significant improvements and new features to the test generation system, focusing on better support for comparative benchmarking, function code unit tests, and more maintainable test configuration. The changes include new test generators, template files, and a refactored exclusion mechanism for test cases, as well as updates to validation tag mappings for better compatibility with
go-playground/validator. The Makefile is also updated to handle the new test files and clean-up logic.New test generation features:
testgen/generate_cmp_perf_tests.go) and function code unit tests (testgen/generate_function_code_tests.go), along with their corresponding templates (testgen/cmp_perf_no_pointer_tests.tpl,testgen/cmp_perf_pointer_tests.tpl,testgen/function_code_test.tpl). These enable automated benchmarking and more thorough unit testing of generated validation code. [1] [2] [3] [4] [5]Test case configuration and exclusion improvements:
excludeIfbitmask intestgen/validations.go, replacing the previousgenerateForstring approach. This makes it easier to manage which tests are generated for pointer/non-pointer types and benchmarking. All relevant test generators now use this mechanism. [1] [2] [3] [4]Validation tag mapping updates:
validatorTagfields intypesValidationto ensure correct mapping togo-playground/validatortags for all supported validation operations (e.g.,email,required,eq,ne,gt,gte,lt,lte,min,max,eq_ignore_case). This improves compatibility and accuracy of generated comparative tests. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Makefile and test generation workflow updates:
Makefileto support new test files and clean-up logic for generated benchmarks and function code tests, ensuring the build system stays clean and up-to-date with the new generators. The main test generation entrypoint (testgen/generate_tests.go) is updated to invoke all new generators. [1] [2] [3]These changes collectively improve the robustness, maintainability, and extensibility of the test generation framework, while enabling more thorough validation and benchmarking of generated code.