This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details from the WIP README for upcoming v0.4.0
The Stenographer
The stenographer keeps a short-hand record of everything that happens in the courtroom. These logs can be used for troubleshooting, creating reports, or re-enacting the courtroom activities at a later date (and with different actors.
The stenographer's logs are similar to HTTP access logs in this respect, but in a format that's more compact and suited to Pacto. A typical HTTP access log might look like this:
If Pacto has the following services registered:
![routes.png](https://camo.githubusercontent.com/a0be61c9b830cb6f70edb6afce3efc6fd451dbca2aa1bdcc686a4bd9f9470d0f/68747470733a2f2f6472616674696e2e636f6d3a3434332f696d616765732f31363830303f746f6b656e3d385a32626d7362784f5137346f6765655754584277797656614a305942664e4a43665154486130384c33416e765158736e496634306874774d56756453497567416d70654a70384d4435336d4e3746507a66677147396f)
Then it can match those requests to request and generate a stenographer log that looks like this:
This log file is designed so Pacto it can be used by Pacto to simulate the requests:
Since Pacto has added a layer of abstraction you can experiment with changes to the contracts (including routing) without needing to re-record the interactions with the stenographer. For example Pacto will adjust if you change the route from:
![original_put.png](https://camo.githubusercontent.com/76e2872b5519e53ab3526ae784466af3773da7fc8e4b8130ff17e6a45a4ff9a3/68747470733a2f2f6472616674696e2e636f6d3a3434332f696d616765732f31363830313f746f6b656e3d367949375675675571614c4a414d704d7666346f416c5075636651426e66647264634770634375554645545f46483545305a72654649724c3143375532477752754e6e646e7463394f5449584c442d423277626b697967)
![new_put.png](https://camo.githubusercontent.com/f58bb70fdd4d6bb847d58ee87d4cc9372c7f134cd4115c1d09d1bb957cb4335f/68747470733a2f2f6472616674696e2e636f6d3a3434332f696d616765732f31363830323f746f6b656e3d49616751583267674849616143665247685235713835634b396f4e4e364f6746583279633961543043545a6b477a78554d5842316e5234306d7749595261743764556557504f6d4c65624e4f4857584f4b6c70652d6955)
to