Latest 2.2.2
Homepage https://github.com/Subito-it/SBTUITestTunnel
License Apache License, Version 2.0
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

Version
License
Platform

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
  • interact with NSUserDefaults
  • download/upload files from/to the app’s sandbox
  • monitor network calls
  • define custom blocks of codes executed in the application target

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 subclass of XCUIApplication which comes with additional features, so it is very easy to integrate (or at least try it out 😉) with your existing testing code.

Additional resources?

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

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
  • Migration: Migration instructions from 1.x to 2.x

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.

Latest podspec

{
    "name": "SBTUITestTunnel",
    "version": "2.2.2",
    "summary": "Enable network mocks and more in UI Tests",
    "description": "Use this library to easily setup an HTTP tunnel between our UI Tests cases and the app under test.nThe tunnel allows to inject data in order to enabale network mocking.",
    "homepage": "https://github.com/Subito-it/SBTUITestTunnel",
    "license": "Apache License, Version 2.0",
    "authors": {
        "Tomas Camin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Subito-it/SBTUITestTunnel.git",
        "tag": "2.2.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "frameworks": "UIKit",
    "subspecs": [
        {
            "name": "Server",
            "source_files": [
                "Pod/Server/*.{h,m}",
                "Pod/Common/*.{h,m}"
            ],
            "dependencies": {
                "GCDWebServer": [
                    "~> 3.0"
                ]
            }
        },
        {
            "name": "Client",
            "frameworks": "XCTest",
            "source_files": [
                "Pod/Client/*.{h,m}",
                "Pod/Common/*.{h,m}"
            ]
        }
    ]
}

Pin It on Pinterest

Share This