https://github.com/adevintaspain/vaporiser
A Swift mock server backed by Vapor for general purpose XCUI Testing
https://github.com/adevintaspain/vaporiser
Last synced: 6 months ago
JSON representation
A Swift mock server backed by Vapor for general purpose XCUI Testing
- Host: GitHub
- URL: https://github.com/adevintaspain/vaporiser
- Owner: AdevintaSpain
- License: mit
- Created: 2024-05-31T11:36:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-07T07:17:46.000Z (12 months ago)
- Last Synced: 2025-04-01T17:53:37.194Z (6 months ago)
- Language: Swift
- Size: 30.3 KB
- Stars: 3
- Watchers: 27
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vaporiser
A Swift mock server backed by Vapor for general purpose XCUI Testing Built using Swift and Vapor framework, ensuring seamless integration and high performance.
## Installation
Add package dependency:
```
dependencies: [
.package(url: "https://github.com/AdevintaSpain/Vaporiser.git", from: "1.0.0"),
],
```Simple usage example can be viewed [here](https://github.com/AdevintaSpain/Vaporiser/blob/main/Example/ExampleUITests/ExampleUITests.swift)
1. Async start the server:
```
try server.start()
```2. Add mocks using
```
server.store(
mock: MockData(
path: "path/mock/responds/to",
responseBody: Data,
method: HTTPMethod
)
)
```3. Stop server on `tearDown`
```
server.stop()
```## Notes
Example project uses [this server](https://alexwohlbruck.github.io/cat-facts/docs/endpoints/facts.html), which is being mocked in the XCUI tests.
This project is not meant to exemplify architecture, rather to examplify a basic feature of the mock server used in XCUI tests.