https://github.com/testertech/wiremock-stateful-api-testing
Code for the YT video https://youtu.be/lXNJUzCTpEo WireMock and Rest-Assured for statefull API testing
https://github.com/testertech/wiremock-stateful-api-testing
Last synced: 11 months ago
JSON representation
Code for the YT video https://youtu.be/lXNJUzCTpEo WireMock and Rest-Assured for statefull API testing
- Host: GitHub
- URL: https://github.com/testertech/wiremock-stateful-api-testing
- Owner: TesterTech
- Created: 2022-03-02T21:04:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-15T21:30:30.000Z (almost 4 years ago)
- Last Synced: 2025-02-01T10:11:16.403Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WireMock-stateful-api-testing
WireMock and Rest-Assured for stateful API testing
## WireMock standalone
This script makes use of wiremock standalone jar
- To record start WireMock standalone the following way
```shell
java -jar wiremock-jre8-standalone-.jar --port <7777> \
--proxy-all="http://:" \
--record-mappings \
--verbose
```
## Mappings
- Make the mapping by putting your request/responsemappings in the mappings.json file in the mappings dir
- Remember to restart once new mappings have been added.
- The mappings used in the video [can be found here](./mapping-example.json)
## State
- State can be setup in the mappings, can be called using ```__admin/scenarios```
## Rest Client (desktop)
- Using [insomnia rest client](https://insomnia.rest/) as a rest client
- This is mainly used to setup and play around with the Backend JAVA API
## Application
- Todo Backend applications [more info here](https://todobackend.com/)
- The specific one I used was [this one] which used Javalin (https://github.com/johanvogelzang/todo-backend)
# References
- https://wiremock.org/docs/stateful-behaviour/
- https://wiremock.org/docs/record-playback/
-