keploy
keploy copied to clipboard
[Feature]: Create a normalisation command in keploy CLI
Related Issue
- New CLI Command Feature
Closes: #1538
Describe the changes you've made
Added keploy normalise
command to the Keploy CLI to allow users to normalise their test cases. The Function of the command is as follows:
- The command checks for
test-sets
,test-cases
andtest-run
flags from the CLI - The command reads YAML files containing test data and unmarshals it..
- The command iterates over each failed test case in the test data and retrieves the corresponding test data from the struct.
- The command then updates the expected response in the test case file with the actual response obtained
- Finally, the program writes the updated YAML data back to the original testcase files.
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Code style update (formatting, local variables)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
Please let us know if any test cases are added
NIL
Describe if there is any unusual behaviour of your code(Write NA
if there isn't)
NA
Checklist:
- [x] My code follows the style guidelines of this project.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [x] My changes generate no new warnings.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] New and existing unit tests pass locally with my changes.
Screenshots (if any)
@charankamarapu Kindly review this PR and let me know if this implementation works!
From the screenshot I can say there is a bit of feature missing. User should give the testcases and testSet name which user want to normalise.
From the screenshot I can say there is a bit of feature missing. User should give the testcases and testSet name which user want to normalise.
Alright, if that is how we would want to implement this feature it should not be a problem at all. Will update asap and revert!
@charankamarapu Let me know if this implementation is ready to go or there is a need to further include more features in this!
@charankamarapu If the CI pipeline will require time to fix, this PR is ready to be merged
cool will do a review and let you know.
@charankamarapu I have addressed the review comments. Looking forward to your review on them
@Akash-Singh04 if the comments are resolved feel free to resolve them, @charankamarapu would review the updated PR
@shivamsouravjha Need some time to properly look into the refactored codebase to resolve the comments,
Sure thing @Akash-Singh04 in the meanwhile you can move it as a draft,