Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Use Pact-JVM for AccountClientTest #42

Closed
wants to merge 1 commit into from
Closed

Conversation

seanf
Copy link
Contributor

@seanf seanf commented Dec 17, 2014

Proof of concept for using Pact-JVM.

@huangp
Copy link
Collaborator

huangp commented Dec 17, 2014

pack is not in fedora...

@seanf
Copy link
Contributor Author

seanf commented Dec 17, 2014

That's a shame, but we aren't running tests in Koji, are we?

On 17 December 2014 at 15:21, Patrick Huang notifications@github.com
wrote:

pack is not in fedora...


Reply to this email directly or view it on GitHub
#42 (comment).

@huangp
Copy link
Collaborator

huangp commented Dec 17, 2014

We are running tests. In the past there is some problem in hamcrest package that prevents us from running it. Now it's fixed.
Besides this, I think CDC works better when you don't have an explicit contract between client and server. But in our case, we do. Unless we remove zanata-api dependency from client, or we start to use some non-exposed API in client, I can't see much value in using Pack over current stub-server.

@seanf
Copy link
Contributor Author

seanf commented Dec 18, 2014

On 18 December 2014 at 08:33, Patrick Huang notifications@github.com
wrote:

We are running tests. In the past there is some problem in hamcrest
package that prevents us from running it. Now it's fixed.

Okay, good. But we shouldn't exclude enhancements to the client purely on
the basis of whether they exist in Fedora (yet), so I think it's worth
considering.

Besides this, I think CDC works better when you don't have an explicit
contract between client and server. But in our case, we do.

We have API classes, which aren't quite the same thing, but the API changes
over time. It has to. And we've already had problems with lock-step
upgrades because of it.

Using CDCs would allow us to extend the REST API in a client-driven (or
test-driven) approach, which often leads to better designed APIs and faster
iteration. And with Pact, effort which goes into stubbing can become a
testable contract.

Unless we remove zanata-api dependency from client, or we start to use
some non-exposed API in client, I can't see much value in using Pack over
current stub-server.

I think that's partly because I started with a very simple test. Perhaps
we should see how it looks with a more complex feature, such as pushing
source docs.


Reply to this email directly or view it on GitHub
#42 (comment).

@seanf
Copy link
Contributor Author

seanf commented Feb 26, 2015

Pact can't do what I had hoped (test a sequence of interactions which change the server state), so I don't think we'll worry about it.

@seanf seanf closed this Feb 26, 2015
@seanf seanf deleted the pact branch February 26, 2015 04:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants