Latest 1.2.2
License MIT
Platforms ios 7.0
Dependencies GCDWebServer

Backchannel for UITesting.

Snapshot is awesome.

Now it uses UI Testing.

UI Testing is massively better than UI Automation – but sometimes, you just want to cheat.

HSTestingBackchannel gives you a simple method to send messages from your UITesting tests directly to your running app in the form of notifications.


Install with CocoaPods

pod 'HSTestingBackchannel', :configuration => ['Debug']


  1. use a prefix file and

    #define SNAPSHOT true

    (We’re still hoping that snapshot will re-introduce custom build arguments)

  2. In your App Delegate, install the

    #ifdef SNAPSHOT
        #import <HSTestingBackchannel/HSTestingBackchannel.h>
    (and then in application:didFinishLaunchingWithOptions:)
    #ifdef SNAPSHOT
        [HSTestingBackchannel installReceiver];
  3. Send notifications from your UITesting class

    [HSTestingBackchannel sendNotification:@"SnapshotTest"];


[HSTestingBackchannel sendNotification:@"SnapshotTest"
  1. Respond to notifications within your app

    #ifdef SNAPSHOT
        [[NSNotificationCenter defaultCenter] addObserver:self

Bonus – Copy dummy files to the Simulator

Within a test method (or in setUp), call something like

[HSTestingBackchannel installFilesFrom:@"..pathTo/fastlane/DummyImages" 

This will install the contents of DummyImages in the resources folder of your running app.
You can also install directly to the Documents directory in the app.

How it works

HSTestingBackchannel installs a webserver in your main app (GCDWebServer).

You simply send requests directly to that – and it recognises them and broadcasts NSNotifications

Latest podspec

    "name": "HSTestingBackchannel",
    "version": "1.2.2",
    "summary": "Send notifications directly from your UITesting classes to your running app.",
    "description": "Sometimes you want to cheat in your UITesting.nnHSTestingBackchannel provides an easy way for you to send notifications to your running app. You can use these to set things up for tests, screenshots, etc",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Rob": "[email protected]"
    "platforms": {
        "ios": "7.0"
    "source": {
        "git": "",
        "tag": "1.2.2"
    "source_files": [
    "exclude_files": "Classes/Exclude",
    "dependencies": {
        "GCDWebServer": []

Pin It on Pinterest

Share This