Esta idea está muy interesante para hacer tests de clientes que usen mocks de servers cuyo comportamiento se graba de corridas contra servers reales, ¿habrá algo así para java/.net?
Pacto judges the contracts between consumers and providers of RESTful services. It can aid in designing realistic test doubles, by ensuring the double complies with the same contract as the real service. It can also aid with service evolution patterns, like Consumer-Driven Contracts or Documentation-Driven Contracts.
Pacto ensures consumers meet their contractual obligations:
Send the required HTTP request headers
Send an appropriate request body (when required)
Pacto also ensures providers meet their contractual obligations:
Send an appropriate response code
Send the required HTTP response headers
Send an appropriate response body
Pacto can also ensure the provider and consumer collaborate appropriately. It can ensure that for a given scenario:
The consumer calls the expected service(s) with a valid request
The provider sends a valid response
No unexpected services were called