Is your feature request related to a problem? Please describe.
We often manually create expectations for response data. This process is very tedious. Therefore, we will add a function to generate the expected value data in a specified path when the test is executed with a specific procedure.
Describe the solution you'd like
We would add the Golden() method. This method writes response body data to the specified file path. However, the write operation is performed only when certain flags are enabled.
The method to enable the flags is under consideration. For example, we can create a spectest cli command, and the Golden() method will generate a file if the --golden option of this command is enabled.
Is your feature request related to a problem? Please describe.
We often manually create expectations for response data. This process is very tedious. Therefore, we will add a function to generate the expected value data in a specified path when the test is executed with a specific procedure.
Describe the solution you'd like
We would add the Golden() method. This method writes response body data to the specified file path. However, the write operation is performed only when certain flags are enabled.
The method to enable the flags is under consideration. For example, we can create a spectest cli command, and the Golden() method will generate a file if the --golden option of this command is enabled.