baloo
baloo copied to clipboard
Extract Response Body?
I have several test cases that perform JSON asserations. However, I need to extract specific fields from a JSON response that will be used for subsequent business logic.
How does one extract values from the response body?
You can write your own assertion function, where you can perform the specific JSON structure assertions the way you prefer in standard Go. See this example: https://github.com/h2non/baloo/blob/master/_examples/custom_assertion/custom_test.go