{"id":28327438,"url":"https://github.com/alexmx/insider","last_synced_at":"2025-10-09T11:09:05.855Z","repository":{"id":56915518,"uuid":"51852274","full_name":"alexmx/Insider","owner":"alexmx","description":"Insider sets a backdoor into your app for testing tools like XCTest, Appium, Calabash, etc.","archived":true,"fork":false,"pushed_at":"2018-06-22T14:16:22.000Z","size":651,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-11T23:27:06.248Z","etag":null,"topics":["appium","automation-test","calabash","frank","ios","testing","testing-framework","testing-tools"],"latest_commit_sha":null,"homepage":"http://alexmx.github.io/Insider","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexmx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-16T16:52:27.000Z","updated_at":"2025-07-07T15:39:39.000Z","dependencies_parsed_at":"2022-08-21T03:50:31.475Z","dependency_job_id":null,"html_url":"https://github.com/alexmx/Insider","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/alexmx/Insider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmx%2FInsider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmx%2FInsider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmx%2FInsider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmx%2FInsider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexmx","download_url":"https://codeload.github.com/alexmx/Insider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmx%2FInsider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001286,"owners_count":26083058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appium","automation-test","calabash","frank","ios","testing","testing-framework","testing-tools"],"created_at":"2025-05-26T02:18:54.887Z","updated_at":"2025-10-09T11:09:05.823Z","avatar_url":"https://github.com/alexmx.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Insider\n\n[![Build Status](https://travis-ci.org/alexmx/Insider.svg?branch=master)](https://travis-ci.org/alexmx/Insider)\n[![Twitter: @amaimescu](https://img.shields.io/badge/contact-%40amaimescu-blue.svg)](https://twitter.com/amaimescu)\n[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/alexmx/ios-ui-automation-overview/blob/master/LICENSE)\n\nInsider is an utility framework which sets a **backdoor** into your app for testing tools like [Appium](http://appium.io/), [Calabash](http://calaba.sh/), [Frank](http://www.testingwithfrank.com/), etc.\n\n## Why do I need this?\nThere are many scenarios which are hard to cover during the automation testing because the testing environment is isolated from the tested app:\n\n* Set a particular state for the app during the test scenario;\n* Simulate push notifications;\n* Simulate app invocation using custom schemes / universal links;\n* Simulate handoff invocations;\n* Manage files / directories in application sandbox;\n* Collect metrics from the app during test execution (CPU, memory, etc.);\n* etc.\n\nInsider runs an HTTP server inside the application and listens for commands (RPCs). By default, Insider runs on `http://localhost:8080`. \n\nA command represents a simple HTTP request: `http://localhost:8080/\u003ccommand\u003e`. You can pre-configure your app to simulate an action when it receives such a remote command.\n\n## Features\n\n|  | Built-in Features | Commands | HTTP Method\n------------ | ------------- | ------------- | -------------\n🚚 | Send a message (dictionary) to the app; | `/send` | POST\n🚌 | Send a message to the app and wait for response; | `/sendAndWaitForResponse` | POST\n📢 | Send local notifications through **NSNotificationCenter** with given parameters; | `/notification` | POST\n📱 | Get device system state information (CPU, memory, IP address, etc); | `/systemInfo` | GET\n:floppy_disk: |  Manage files / directories in application sandbox (Documents, Library, tmp); | `/documents/\u003ccommand\u003e`\u003cbr /\u003e `/library/\u003ccommand\u003e`\u003cbr /\u003e `/tmp/\u003ccommand\u003e` | See the table below\n\nSupported commands for file managing feature:\n\n File Managing Commands | HTTP Method \n------------ | ------------- \nList items: `/\u003cdirectory\u003e/list` | GET\nDownload items: `/\u003cdirectory\u003e/download`  | GET\nUpload items: `/\u003cdirectory\u003e/upload`  | POST\nMove items: `/\u003cdirectory\u003e/move`  | POST\nDelete items: `/\u003cdirectory\u003e/delete`  | POST\nCreate folder: `/\u003cdirectory\u003e/create`  | POST\n\nIn the `scripts` directory can be found sample ruby scripts which show the built-in features in action.\n\nCheck out the [API reference](http://alexmx.github.io/Insider/) for more information.\n\n## Installation\n\n#### Manual installation\n\nIn order to include the **Insider** library into your project, you need to build a dynamic framework from provided source code and include it into your project, or inlcude the entire **Insider** library as sub-project by copying it to your project directory or include as Git submodule.\n\n#### Carthage\n\nIf you are using **Carthage**, you can always use it to build the library within your workspace by adding the line below to your `Cartfile`.\n\n```\ngithub \"alexmx/Insider\"\n```\n\n#### CocoaPods\n\nIf you are using **CocoaPods**, you can as well use it to integrate the library by adding the following lines to your `Podfile`.\n\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\n\ntarget 'YourAppTarget' do\n    pod \"Insider\"\nend\n\n```\n\n## Usage\n\n#### Use case #1: Simulate Push Notifications\n\n```swift\n\nimport Insider\n\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -\u003e Bool {\n\n\t// Launch the Isider with the given delegate\n        Insider.shared.start(withDelegate: self)\n        \n        return true\n  }\n  \n  func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) { \n  \t// Process push notification \n  }\n}\n\nextension AppDelegate: InsiderDelegate {\n\n  // This delegate method is invoked when a remote message is sent to the app\n  func insider(_ insider: Insider, didReceiveRemote message: InsiderMessage?) {\n        // Simulate push notification\n        application(UIApplication.shared, didReceiveRemoteNotification: message!)\n  }\n}\n\n```\nIn order to test this example run `InsiderDemo` application target, after go to `scripts` directory and run `send_message.rb` script.\n\n#### Use case #2: Simulate app invocation using a custom scheme\n\n```swift\n\nimport Insider\n\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -\u003e Bool {\n\n        Insider.shared.start(withDelegate: self)\n        \n        return true\n  }\n  \n  func application(_ application: UIApplication, handleOpen url: URL) -\u003e Bool {\n        \n\t// Process custom scheme invocation\n        return true\n  }\n}\n\nextension AppDelegate: InsiderDelegate {\n\n  func insider(_ insider: Insider, returnResponseMessageForRemote message: InsiderMessage?) -\u003e InsiderMessage? {\n        // Simulate app invocation using a custom scheme\n        let url = URL(string: \"insiderDemo://hello/params\")\n        let response = application(UIApplication.shared, handleOpen: url!)\n        \n        return [\"response\" as NSObject : response as AnyObject]\n  }\n}\n\n```\nIn order to test this example run `InsiderDemo` application target, after go to `scripts` directory and run `send_message_with_response.rb` script.\n\n#### Use case #3: Get application system information during test execution\n\n```swift\nimport Insider\n\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -\u003e Bool {\n\n        Insider.shared.start()\n        \n        return true\n  }\n}\n```\nAs it is a built-in feature there is no need to set a delegate for Insider in this case. In order to test this example run `InsiderDemo` application target, after go to `scripts` directory and run `system_info.rb` script.\n\n#### Use case #4: Add files to Documents folder in application sandbox.\n\n```swift\nimport Insider\n\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -\u003e Bool {\n\n        Insider.shared.start()\n        \n        return true\n  }\n}\n```\nAs it is a built-in feature there is no need to set a delegate for Insider in this case. \n\nThere are 3 directories supported in application sandbox:\n* **Documents**: `http://localhost:8080/documents`\n* **Library**: `http://localhost:8080/library`\n* **tmp**: `http://localhost:8080/tmp`\n\nYou can create new folders. Upload, download, move, remove files / folders from application sandbox. \n\nIn order to test this example run `InsiderDemo` application target, and open in your browser: \n\n* [http://localhost:8080/documents](http://localhost:8080/documents), \n* [http://localhost:8080/library](http://localhost:8080/library)\n* [http://localhost:8080/tmp](http://localhost:8080/tmp)\n\nYou will see the files which are in your application sandbox.\n\n![Insider](/assets/sandbox.png)\n\nIf you need to use the sandbox files managing API in your automation scripts please check **File Managing Commands** section above.\n\n## Credits\n**Insider** uses these amazing libaries under the hood:\n* [GCDWebServer](https://github.com/swisspol/GCDWebServer)\n* [iOS-System-Services](https://github.com/Shmoopi/iOS-System-Services)\n\n## License\nThis project is licensed under the terms of the MIT license. See the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmx%2Finsider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexmx%2Finsider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmx%2Finsider/lists"}