Skip to content

A Swift mock server backed by Vapor for general purpose XCUI Testing

License

Notifications You must be signed in to change notification settings

AdevintaSpain/Vaporiser

Repository files navigation

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

  1. Async start the server:
try server.start()
  1. Add mocks using
server.store(
    mock: MockData(
        path: "path/mock/responds/to",
        responseBody: Data,
        method: HTTPMethod
    )
)
  1. Stop server on tearDown
server.stop()

Notes

Example project uses this server, 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.

About

A Swift mock server backed by Vapor for general purpose XCUI Testing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages