Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we remove support for Pact Web (+ Karma etc.)? #626

Closed
mefellows opened this issue Mar 10, 2021 · 1 comment
Closed

Should we remove support for Pact Web (+ Karma etc.)? #626

mefellows opened this issue Mar 10, 2021 · 1 comment

Comments

@mefellows
Copy link
Member

Background

Pact Web was created to support in browser testing frameworks, such as those that are popular in Angular testing with Karma.

The package pact-web is the DSL to talk to Pact - all of the matchers, the main API etc. It is basically pact, without any dependencies on the file system or ability to start/stop a web server (because they obviously won’t work in a browser.)

Because it can't manage the pact mock service, this means the users are responsible for managing the lifecycle of the Pact mock service (easily done with pre/post scripts), however we created karma-pact to simplify this in Karma tests.

Problems
Pact web poses challenges for the maintainers, but primarily:

  1. It's not that popular a package relative to Pact itself, but does impose a maintenance challenge by the increased product surface area that must be managed
  2. The new v3 (rust) implementation is not conducive to this approach, meaning there will be a large hurdle to make it work in this context
  3. It doesn't support message pacts, and as per (2) probably won't

There are reasons to want to keep it though:

  1. Angular is a popular framework and i’m there are others that use this form of testing
  2. We ideally want to be as idiomatic and integrated as possible

Current usage:

This represents only a fraction of the 100k+ downloads a week that Pact JS actually gets.

Proposal

If people are using the package, why might we consider removing it? The main response is that teams could just write pact tests using a separate testing framework (Jest, Mocha etc.).

This isn't ideal, as summarised in: #216 (comment)

In my situation it isn't necessarily the most straightforward thing to do though. All of our JS tests are currently run in-browser continuously upon every change and developers don't need to leave the browser to see the result of their changes. They keep switching between the editor and the browser or place them side-by-side if they have a large monitor. With pact tests run in node they will also need to look in the terminal, which adds another window to watch and that would require some retraining / getting used to. OS notifications / growl could reduce that need but in my experience most people prefer to see the progress "dots" of tests being (re)run.

See also point (2) above - we want to support teams using the tools and workflows that work for them.

@mefellows
Copy link
Member Author

I've decided to retire support for Pact Web. At the moment, the burden of maintaining the extra interface, packages (e.g. Kama) and examples is just not worth it, when we have a first class testing capability with Node JS based packages.

Support will be dropped immediately as of the current version, as we aren't planning on any major new features that would benefit any of the packages before the release of the next major edition, and we currently have several challenges maintaining the current version (old version of webpack no longer works with latest versions of node, failing builds with Karma despite no obvious changes from the Pact JS package).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant