Popularity
3.4
Declining
Activity
0.0
Stable
229
5
5

Code Quality Rank: L5
Programming language: Swift
Tags: Testing     UI Testing    
Latest version: v0.1.0

Floater_ alternatives and similar libraries

Based on the "UI Testing" category

Do you think we are missing an alternative of Floater_ or a related project?

Add another 'UI Testing' Library

README

FloateršŸ’©

Add a floating fingertip & automate your app demo video using Xcode UI tests.

Check out our blog post for more info.

Video

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

1. Create UI test target

If you don't already have one, create a UI test target for your app.

2. Add FloateršŸ’© to your app & UI test targets

CocoaPods

FloateršŸ’© is available through CocoaPods, however the pod should not simply be imported in its entirety. Rather, the two subspecs FloateršŸ’©/AppStuff and FloateršŸ’©/UITestStuff should each be included separately into your app target & UI test target, respectively.

# Podfile
target 'MyApp' do
    pod 'FloateršŸ’©/AppStuff'
end

target 'MyAppUITests' do
    pod 'FloateršŸ’©/UITestStuff'
end

Sans CocoaPods

  • Everything from FloateršŸ’©/Classes/AppStuff goes into your app target.
  • Everything from FloateršŸ’©/Classes/UITestStuff goes into your UI test target.
  • Everything from FloateršŸ’©/Classes/Shared goes into both your app target and your UI test target.
  • Add HSTestingBackchannel to both targets.

3. Use FloateršŸ’©Application as the application class

Swift

Remove @UIApplicationMain from your AppDelegate file, and create a main.swift file containing the following:

import Floater_

UIApplicationMain(Process.argc, Process.unsafeArgv, NSStringFromClass(FloateršŸ’©Application.self), NSStringFromClass(YOUR_APP_DELEGATE.self))

Objective-C

@import Floater_;

int main(int argc, char * argv[]) {
    @autoreleasepool {
        return UIApplicationMain(argc, argv, NSStringFromClass([FLTRApplication class]), NSStringFromClass([AppDelegate class]));
    }
}

Usage

  1. Write UI tests!

    Write your UI tests as usual, with one difference: Use the floatšŸ’©() method prior to each tap to move the floating fingertip between tap events.

    let awesomeButton = XCUIApplication().buttons["Awesome Button"]
    awesomeButton.floatšŸ’©()
    awesomeButton.tap()
    

    You can call this method on both XCUIElement and XCUICoordinate.

    If you've never written Xcode UI tests, check out the WWDC 2015 session UI Testing in Xcode.

  2. Run your tests in the simulator by hitting āŒ˜+U. You'll be presented with the following prompt:

    Prompt

    Hit ā€œAllowā€. This is necessary for the test process to communicate with your app process.

  3. Use Quicktime Player to record your screen. Boom.