-2

I found PACT in some videos from youtube and looks great and quite interested to start POC for my team. I've read previous questions and try to follow the examples in Pact-JS, but still had some confusion on very basic stuff, so excuse my noob questions.

1. Which repo do I need to refer as official repo?

I assumed ones under Pact-foundation organization are official, but some links in document usually go to different ones.

2. What do I need and from which repo for all the parts of PACT working?

  • Consumer/provider.
    For the start, I think I need PACT_JS.

    github.com/pact-foundation/pact-js

  • Mock service.
    Do I need either pact-node or pact-mock-service-npm, or both as well for mock service?

    github.com/pact-foundation/pact-node
    github.com/pact-foundation/pact-mock-service-npm

  • Broker
    If I want to use broker, then this will need.

    github.com/pact-foundation/pact_broker

I think those 3 are the parts I need to use. Is it correct?

3. If there are multiple teams involved, does 1 shared mock server need/help or not really matter? I'm not clear the benefit of stand alone mock server.

Community
  • 1
  • 1
kevmando
  • 917
  • 1
  • 10
  • 17
  • Too broad. See [ask] – T-Heron Feb 17 '17 at 23:51
  • @T-Heron Can you explain which one is broad? 2 yes/no questions and 1 extended from one of yes/no question. If you ever read pact.io and try to use pact-js and read the answer below, then you will realize they would not be broad at all. – kevmando Feb 19 '17 at 15:30
  • Multiple questions inside one question generally make the question at risk of being ignored or flagged. I would advise keeping this in mind going forward. What I missed was the nuance of you asking these in such a manner as to elicit a yes/no style of response which actually did make it a better target for an answer, and which is what happened in this case. – T-Heron Feb 19 '17 at 15:42
  • Well, I'd rather ask trivial questions in one subject since I don't want to ask which repo to clone makes 4 topics. – kevmando Feb 19 '17 at 15:55
  • It is good you marked the question as answered; too many askers don't click ever the Accept button or even follow up. – T-Heron Feb 19 '17 at 15:58

1 Answers1

1
  1. https://github.com/pact-foundation/pact-js is the official top-level JS repo.
  2. a) That's correct:

    b) You won't need to explicitly include it soon (I'm in the process of an API uplift which should simplify usage), but currently you will need to pull in pact-node to do provider verification

    c) If you want to share via a broker, head to https://github.com/bethesque/pact_broker for details (this is not strictly necessary, but recommended)

  3. You won't need the standalone mock service if you use Pact JS. It is designed to be used in cases where there is no language support for Pact (in this case, JS wraps this under the hood for you)

I would check out the end-to-end example which contains all that you'll probably need, including integration to a Broker.

Matthew Fellows
  • 3,669
  • 1
  • 15
  • 18