pact-foundation / pact-ruby

Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://pact.io
MIT License
2.16k stars 214 forks source link

Pact v4 specification implementation for Pact Ruby #267

Open ThomasKoppensteiner opened 2 years ago

ThomasKoppensteiner commented 2 years ago

Please implement the pact v4 specification for Ruby (MRI and JRuby).

This ticket is a starting point. Please feel free to convert it to a GitHub project or a milestone.

mscottford commented 1 week ago

If this isn't the best place for me to ask my questions about implementing v3/v4 then please direct me to somewhere more appropriate.

Is the sample Ruby spec in the pact-reference repository a viable starting point for someone looking to experiment with creating an implementation of v3 and v4 in Ruby? I'm specifically thinking about the pact_mockserver_mk2 gem which doesn't appear to be published to RubyGems, but is used by the example consumer spec.

It does look like this example was authored quite a while ago, and it hasn't seen many changes since. There's also at least one test that appears to just be a stub and probably should be removed.

I'm interested in Ruby support Pact v3 and v4, because I've been using the Aruba gem to write Cucumber/Gherkin behavior tests for a series of command line executables that interact with some APIs that I also control. I want to be able to use the consumer tests to validate that the API behaves correctly. My research has not uncovered another tool that facilitates testing command line applications via Cucumber/Gherkin at the same level of quality that Aruba does, so using one of the implementations that already supports v3/v4 does not appear to be an option for me.

To that end, I'm interested in helping bring support for v3/v4 to Ruby. I've seen mentions in other issues that there are others who are also working on this effort. What's the best way for me to get involved?

/cc This question also applies to #266, so I'm linking to that issue from here. I suspect that adopting pact-ffi would result in both versions getting added without too much additional effort.