Giter Site home page Giter Site logo

ktyagi / wiremock-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wszczepaniak/wiremock-example

0.0 2.0 0.0 9.25 MB

Rest Service Mock using Wiremock Example with SpringBoot application

License: GNU General Public License v3.0

Java 100.00%

wiremock-example's Introduction

wiremock-example

Rest Service Mock using Wiremock Example with SpringBoot application

Prerequisites

This project uses springboot, junit, lombok, gradle.

  • Recomended IDE : IntelliJ with enabled gradle functionality and lombok plugin, also enabled annotation processing is required.
  • Java 8

Running tests

You can run tests from commandline using

  • gradlew test - in windows commandline
  • ./gradlew test - in PROPER consoles ;)

The main dish

Java based usage of Wiremock resides in src/test/java/example/LocalControllerTest.java

Wiremock standalone

You can run a standalone instance of Wiremock for use in several applications. Standalone version is manageable in real-time (by json requests) or can be supported by the files inside mappings and __files directory

Example running command from the wiremock-standalone directory : java -jar wiremock-standalone-2.5.1.jar --verbose --port 8090

I prepared one request stub inside wiremock-standalone/mapping directory, you can check it out.

Postman

For fluent work with REST requests I personally use Postman application for Chrome browser. I prepared simple postman collection, importable into postman, so you could directly start testing wiremock solution Postman request collection resides in postman-collection directory.

wiremock-example's People

Contributors

wszczepaniak avatar

Watchers

James Cloos avatar  avatar

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.