Latest 1.0.1
Homepage https://github.com/river2202/MonorailSwift
License MIT
Platforms ios 9.0
Authors

Monorail

Version
Carthage compatible
License

Introduction

Monorail is a testing tool to log, record and replay network interactions when doing manual and automatic testing.

Inspired by pact.io but the Monorail can be use not only for unit test but also manual test, stub integration testing and offline demo.

Requirment

Swift 4.1, Xcode 9.3, iOS 9.0

Features

  1. All features work out of box with minimum impact to product code.
  2. Intercept network call and output to debug terminal. Works out of box with native api and most of 3rd SDKs.
  3. Save network interactions into json file
  4. Playback saved network interactions response. Remove the dependence of backend server when doing development or offline demo.

When to use

  1. Troubleshooting, build-in mini network sniffer, print api request and response so developer can see clearly what is sending and receieving.
  2. When manual testing, save and share log to your workstation with shake and click.
  3. Playback the saved log file without backend.
  4. CI
    1. Use saved or manually created log file as stub, run test without backend.
    2. Save network interactions to file when running integration tests
    3. Easely switch between local stub and real backend

How to use

CocoaPods

pod ‘MonorailSwift’, ‘~> 1.0’

Carthage

github "river2202/MonorailSwift" ~> 1.0.0

Code example

Monorail.enableLogger()

Monorail.writeLog()

Monorail.enableReader(from: demo1)

Check MonorailSwift example project for details.

Check wiki for more documents.

Tools

Tools under monorailswift⁩/⁨MonorailSwift⁩Example/Helper⁩/Monorail⁩

Download example project come with the MonorailSwift repository. Run the app in simulator and press keyboard shortcut Cmd + Ctrl + z

Communication

Author

[email protected]

License

Monorail is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MonorailSwift",
    "version": "1.0.1",
    "summary": "MonorailSwift is a test tool to log/write/replay network interactions.",
    "description": "Works out of box with iOS build in api and most of 3rd SDK to print the network api calls, write them to file and replay the tap with simply setup.",
    "homepage": "https://github.com/river2202/MonorailSwift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/river2202/MonorailSwift.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.0",
    "source_files": "MonorailSwift/Classes/**/*"
}

Pin It on Pinterest

Share This