keploy icon indicating copy to clipboard operation
keploy copied to clipboard

[feature]: Create a normalisation command in keploy CLI

Open charankamarapu opened this issue 1 year ago • 2 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues

Summary

Normalisation here means that when ever users application is changed a bit and it is tested against the old test cases the responses may vary and mocks may also vary in few cases . If there is only change in the test case response and not in the mocks then we should make a feature where user can replace the response in the testcase with new response we got in test mode.

Why should this be worked on?

Generally an application will have slight change every month or week while developing . To record test cases every time we change the application code is difficult. This feature wouldn't require re-record and saves developer time.

Repository

keploy

charankamarapu avatar Feb 09 '24 05:02 charankamarapu

Hey @charankamarapu , I have worked on CLI commands and flags before in Keploy and i believe this issue falls under my skillset. Could you kindly elaborate upon how this command is supposed to work?

  • Is it supposed to be an add-on to the test command? That is, after the test has failed, the user has the option to change the responses?
  • Or is it supposed to be a standalone command where the user will manually choose the test case that failed and input a new response header to it?

Thank you for the insights!

SkySingh04 avatar Feb 15 '24 05:02 SkySingh04

  1. Yes this command is something user is going to use after test command. If test fails and user thinks the new response is correct we need to provide option or a command that user can change the response in the yaml.
  2. Once user runs normalisation command you will not ask user to enter input, as test is already done, you will be getting the new response from the test-report and updating the yaml.

charankamarapu avatar Feb 15 '24 12:02 charankamarapu

closed by https://github.com/keploy/keploy/pull/1859

gouravkrosx avatar Jun 27 '24 09:06 gouravkrosx