Coder Social home page Coder Social logo

trendyol / mockingstar-ios Goto Github PK

View Code? Open in Web Editor NEW
44.0 9.0 1.0 4.48 MB

Mocking Star SPM helper library for iOS applications.

Home Page: https://trendyol.github.io/mockingstar/documentation/mockingstar/gettingstarted-ios

License: MIT License

Swift 100.00%
alamofire interceptor mock-server swift urlsession

mockingstar-ios's Introduction

Mocking Star ๐ŸŒŸ

Mocking Star is a powerful request mocking tool designed to simplify the process of http request mocking, network debugging, and using UI tests for your mobile applications.
With just a single line of code, you can use Mocking Star in your project.

Key Features

  • Mocking Requests: Easily mock requests and test different cases with scenarios.
  • Modifying Requests: Modify intercepted requests to test different edge cases, allowing you to assess your application's performance under different conditions.
  • Debugging Support: Use Mocking Star to debug your network requests on your mac.
  • UI Testing: Integrate Mocking Star into your UI tests, creating a reliable and controlled testing environment to validate your mobile application's functionality.

Mocking Star App -> Mocking Star
Android Library -> Mocking Star Android Library

Getting Started ๐Ÿ”ฅ

To begin using Mocking Star in your Swift application, simply add the following line of code:

MockingStar.shared.inject()

This line initializes Mocking Star and prepares it to intercept and process your requests.

How It Works ๐Ÿš€

Mocking Star operates seamlessly through the use of URLProtocol to intercept incoming requests. Here's a step-by-step how it works:

  1. Injection: With MockingStar.shared.inject(), Mocking Star is injected into your application, ready to work its magic.
  2. Request Intercept: Using the power of URLProtocol, Mocking Star intercepts incoming requests before they leave your application and without change your production code.
  3. Communication with Mocking Star App: Intercepted requests are communicated to the Mocking Star macOS application.
  4. Processing and Results: Mocking Star app processes intercepted requests, allowing you to mock, modify, or debug them as needed. The result is then sent back to your application.

Usage Tips โ‡๏ธ

  • Mocking Requests: With Mocking Star, mock requests and simulate different scenarios.
  • Modifying Requests: Modify intercepted requests to test different edge cases.
  • Debugging Support: Use Mocking Star to debug your network requests on your mac.
  • UI Testing: Integrate Mocking Star into your UI tests for reliable and controlled testing environments.
  • Custom URLSessionConfiguration: MockingStar.sharedinject(configuration: URLSessionConfiguration)

Installation

For Xcode project

You can add mockingstar-ios to your project as a package.

https://github.com/Trendyol/mockingstar-ios

For Swift Package Manager

In Package.swift add:

dependencies: [
    .package(url: "https://github.com/Trendyol/mockingstar-ios", from: "1.0.0"),
]

License

This library is released under the MIT license. See LICENSE for details.

mockingstar-ios's People

Contributors

yusufozgul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ataetgi

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.