Swiftpack.co - Package - PGSSoft/AutoMate-AppBuddy
AutoMate, made by PGS Software

AutoMateAppBuddyTemplatesModelGenie

AutoMate AppBuddy

AppBuddy is a helper framework for UI automation tests, designed to work with the AutoMate. It can disable animations in the application and manage events, reminders and contacts.

Swift 5 Travis CocoaPods Compatible Documentation Carthage Compatible Platform License

Installation

CocoaPods

The most convenient way to install it is by using CocoaPods with Podfile:

pod 'AutoMate-AppBuddy'

Carthage

For Carthage Carthage add a line to Cartfile.private:

github "PGSSoft/AutoMate-AppBuddy"

Cartfile.private should be used because AutoMate framework will be used by UI Tests target only not by the tested application.

Swift Package Manager

You can just add AutoMate AppBuddy package to your project by entering it's repository URL

https://github.com/PGSSoft/AutoMate-AppBuddy

Note

AppBuddy should be linked with target application, not with the test target.

Usage

Full documentation is available at https://pgssoft.github.io/AutoMate-AppBuddy/.

  1. Duplicate existing application target.

  2. Import AutoMate_AppBuddy framework to app delegate.

    import AutoMate_AppBuddy
    
  3. Setup LaunchEnvironmentManager in application(_:didFinishLaunchingWithOptions:).

    let launchEnvironmentManager = LaunchEnvironmentManager()
    launchEnvironmentManager.add(handler: defaultEventKitHander, for: .events)
    launchEnvironmentManager.add(handler: defaultEventKitHander, for: .reminders)
    launchEnvironmentManager.add(handler: defaultContactsHander, for: .contacts)
    launchEnvironmentManager.add(handler: defaultIsInUITestHandler, for: .isInUITest)
    launchEnvironmentManager.add(handler: AnimationHandler(), for: .animation)
    launchEnvironmentManager.setup()
    

Features (or ToDo)

  • ☑ Disable UIView animations
  • ☑ Managing events, reminders and contacts
  • ☐ Two way communication
  • ☐ Stubbing network requests
  • ☐ Stubbing contacts, events and reminders
  • ☐ Stubbing notifications
  • ☐ Taking screenshots
  • ☐ Clearing application data
  • ☐ Simulating push notifications

Example application

AutoMate repository contains example application under AutoMateExample directory. Structure of the application is simple, but the project contains extensive suite of UI tests to showcase capabilities of the library.

Development

Full documentation is available at https://pgssoft.github.io/AutoMate-AppBuddy/.

If you want to handle your custom launch environments, you have to implement Handler protocol, e.g.

struct CustomHandler: Handler {
    func handle(key: String, value: String) {
        if value == "production" {

        }
    }
}

launchEnvironmentManager.add(handler: CustomHandler(), for: "SERVER")

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/PGSSoft/AutoMate-AppBuddy.

License

The project is available as open source under the terms of the MIT License.

About

The project maintained by software development agency PGS Software. See our other open-source projects or contact us to develop your product.

Follow us

Twitter URL
Twitter Follow

Github

link
Stars: 28

Dependencies

Used By

Total: 0

Releases

- 2019-07-21 10:18:13

Released on 2019-07-20.

Updated

  • Updated Ruby dependencies.

- 2019-05-12 19:10:20

Released on 2019-05-12.

Updated

  • Compatibility with Swift 5

1.4.0 - 2018-10-21 17:35:16

Released on 2018-10-21.

Updated

  • Compatibility with Xcode 10, Swift 4.2 and iOS 12

- 2018-01-11 08:29:24

Released on 2018-01-11.

Updated

  • iOS deployment target is now 9.3
  • Using one target for all platform

- 2017-11-14 12:30:07

Released on 2017-11-14.

Added

  • Compatibility with Xcode 9.1, Swift 4 and iOS 11

Updated

  • Deployment target is now 10.3

- 2017-07-03 08:51:12

Released on 2017-07-03.

Added

  • Information whether the application is running in the UI test environment.

- 2017-03-29 09:52:47

Released on 2017-03-29.

Added

  • Compatibility with Xcode 8.3 and Swift 3.1.

- 2017-03-15 11:00:09

Released on 2017-03-15.

Added

  • Disable UIView animations
  • Managing events, reminders and contacts