Send notifications directly from your UITesting classes to your running app.
Switch branches/tags
Clone or download
Latest commit 8cb591f Aug 8, 2017
Failed to load latest commit information.
Classes device type Jul 9, 2017
.gitignore Initial checkin Nov 4, 2015
HSTestingBackchannel.podspec Release 1.2.1 May 5, 2016
LICENSE Initial checkin Nov 4, 2015 fix readme headlines Aug 7, 2017

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 helper

    #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