You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my provider project, I'm interested in presenting the results in a different format (e.g. having multiple mocha tests for each thing tested, rather than a large single test).
Taking a look at how I could parse the output from verifyProvider, I noticed that the underlying binary (pact-ruby-standalone) allows a --format flag to be passed, with JSON available as one of the outputs.
I have quickly put together a proof of concept here: #86 . By not appending the stderr output to the string (due to it adding INFO lines), and by specifying the format to be json, I was able to parse the JSON response.
I'd be happy to work on implementing this feature fully beyond the proof of concept (e.g. agree on what the options should be called, adding in tests etc.)
The text was updated successfully, but these errors were encountered:
@joshhendo I'm going to do another release (6.18.1) that instead of using "RspecJunitFormatter" for format, just uses "xml" instead, so the option is either "json" or "xml". I feel like the abstraction is needed and better reflects what the binary is actually doing. Hope that's alright.
In my provider project, I'm interested in presenting the results in a different format (e.g. having multiple mocha tests for each thing tested, rather than a large single test).
Taking a look at how I could parse the output from
verifyProvider
, I noticed that the underlying binary (pact-ruby-standalone
) allows a--format
flag to be passed, with JSON available as one of the outputs.I have quickly put together a proof of concept here: #86 . By not appending the
stderr
output to the string (due to it addingINFO
lines), and by specifying the format to bejson
, I was able to parse the JSON response.I'd be happy to work on implementing this feature fully beyond the proof of concept (e.g. agree on what the options should be called, adding in tests etc.)
The text was updated successfully, but these errors were encountered: