Coder Social home page Coder Social logo

wiremock / gradle-wiremock-extension-plugins Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 165 KB

Gradle plugins that bundles common packaging and release logic for WireMock extensions

License: Apache License 2.0

Kotlin 100.00%
gradle gradle-plugin kotlin wiremock

gradle-wiremock-extension-plugins's Introduction

WireMock - flexible and open source API mocking

WireMock Logo

Build Status Docs a Participate Maven Central

WireMock is a popular open-source tool for API mock testing with over 5 million downloads per month. It can help you to create stable test and development environments, isolate yourself from flakey 3rd parties and simulate APIs that don’t exist yet.

Started in 2011 as a Java library by Tom Akehurst, now WireMock spans across multiple programming languages and technology stacks. It can run as a library or client wrapper in many languages, or as a standalone server. There is a big community behind the project and its ecosystem.

WireMock supports several approaches for creating mock APIs - in code, via its REST API, as JSON files and by recording HTTP traffic proxied to another destination. WireMock has a rich matching system, allowing any part of an incoming request to be matched against complex and precise criteria. Responses of any complexity can be dynamically generated via the Handlebars based templating system. Finally, WireMock is easy to integrate into any workflow due to its numerous extension points and comprehensive APIs.

Key Features

WireMock can run in unit tests, as a standalone process or a container. Key features include:

  • HTTP response stubbing, matchable on URL, header and body content patterns
  • Configuration via a fluent Java API, JSON files and JSON over HTTP
  • Record/playback of stubs
  • Request verification
  • Fault and response delays injection
  • Per-request conditional proxying
  • Browser proxying for request inspection and replacement
  • Stateful behaviour simulation
  • Extensibility

Full documentation can be found at wiremock.org/docs.

Questions and Issues

If you have a question about WireMock, or are experiencing a problem you're not sure is a bug please post a message to the WireMock Community Slack in the #help channel.

On the other hand if you're pretty certain you've found a bug please open an issue.

Log4j Notice

WireMock only uses log4j in its test dependencies. Neither the thin nor standalone JAR depends on or embeds log4j, so you can continue to use WireMock 2.32.0 and above without any risk of exposure to the recently discovered vulnerability.

Contributing

WireMock exists and continues to thrive due to the efforts of contributors. Regardless of your expertise and time you could dedicate, there're opportunities to participate and help the project!

See the Contributing Guide for more information.

gradle-wiremock-extension-plugins's People

Contributors

kyle-winkelman avatar oleg-nenashev avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kyle-winkelman

gradle-wiremock-extension-plugins's Issues

Add support for custom licenses

Proposal

At the moment, only Apache License v2 is supported and hardcoded. It would be nice to make it overridable

References

No response

Automate GitHub Releases

Summary

Right now the extension is released locally. It would be great to automate publishing to the Gradle plugin repository

References

No response

What does it mean to be a standalone extension?

Proposal

Should a standalone extension be:

  • compatible with wiremock-standalone
  • used alongside wiremock-standalone or separately
  • be intended for use with test containers (similar to above question because the default image will include wiremock-standalone and therefore will need to be compatible)
  • would the standalone extension ever be used with normal wiremock

The reason I am asking is because depending on what is envisioned I would expect the shadowjar to be created differently.

If it is to be compatible with wiremock-standalone, it should relocate the same packages as wiremock-standalone does.

If it is to be used alongside wiremock-standalone, it should define the wiremock dependencies as shadow to make the jar a lot smaller.

Reproduction steps

Create a standalone extension that uses a transitive dependency of WireMock like org.fasterxml.jackson then put wiremock-standalone on the classpath before your extension. For example, using Json.read(json, TypeReference<List<Example>> {} ()) will cause an issue because TypeReference in WireMock will be relocated to wiremock.org.fasterxml.jackson but your standalone extension will still be using org.fasterxml.jackson.

References

wiremock-standalone relocates to copy
make standalone extension jar smaller by declaring these shadow

Add support for multiple developers

Proposal

At the moment the plugin takes only a single developer from the properties file. It would be great to support setting multiple developers

developer.id=johndoe
developer.name=John Doe
[email protected]

References

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.