Giter Site home page Giter Site logo

sbtuitesttunnel's Introduction

SBTUITestTunnel

Version License Platform Swift Package Manager

Overview

Apple introduced a new UI Testing feature starting from Xcode 7 that is, quoting Will Turner on stage at the WWDC, a huge expansion of the testing technology in the developer tools. The framework is easy to use and the integration with the IDE is great however there is a major problem with the way tests are launched. Testing code runs as a separate process which prevents to directly share data with the app under test making it hard to do things like dynamically inject data or stub network calls.

SBTUITestTunnel extends UI testing functionality allowing to dynamically:

  • stub network calls
  • download/upload files from/to the app's sandbox
  • monitor network calls
  • rewrite network calls
  • block cookies
  • interact with NSUserDefaults
  • define custom blocks of codes executed in the application target
  • fine grain fast-scrolling in table/collection/scroll views
  • CLLocationManager stubbing
  • UNUserNotificationCenter stubbing

The library supports concurrent parallel testing, so multiple Simulators can be used at once.

The library consists of two separated components which communicate with each other, one to be instantiate in the application's target and the other in the testing target.

Should I use this?

SBTUITestTunnel is intended to extend Apple's XCTest framework, not to replace it. It all boils down to a single subclass of XCUIApplication which comes with the additional features listed above, so it is very easy to integrate with your existing testing code.

Documentation

  • Installation: Describes how to install the library
  • Setup: Describes how to integrate the library in your code
  • Usage: Describes how to use the library

Additional resources?

We made additional resources available to improve the UI Testing experience:

  • Mendoza: parallelize UI tests over multiple physical machines
  • Cachi: parse Xcode's 11 .xcresult bundles
  • SBTUITestTunnelHost: access the mac host from your test target

Thanks

Kudos to the developers of the following pods which we use in SBTUITestTunnel:

Contributions

Contributions are welcome! If you have a bug to report, feel free to help out by opening a new issue or sending a pull request.

Authors

Tomas Camin (@tomascamin)

License

SBTUITestTunnel is available under the Apache License, Version 2.0. See the LICENSE file for more info.

sbtuitesttunnel's People

Contributors

tcamin avatar ryan-noths avatar atom-wintermute avatar cameroncooke avatar kaomte avatar navartis avatar egorkomarov avatar ashraf-ali-aa avatar lyricsboy avatar cyhsutw avatar antigp avatar francybiga avatar tinder-maxwellelliott avatar tinder-owenthomas avatar

Watchers

James Cloos avatar

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.