{"id":18389309,"url":"https://github.com/rightpoint/fry","last_synced_at":"2025-12-12T06:23:29.730Z","repository":{"id":21463649,"uuid":"24782119","full_name":"Rightpoint/FRY","owner":"Rightpoint","description":"UIKit Integration Library","archived":false,"fork":false,"pushed_at":"2016-05-06T17:17:48.000Z","size":568,"stargazers_count":77,"open_issues_count":2,"forks_count":9,"subscribers_count":33,"default_branch":"master","last_synced_at":"2024-03-15T10:20:33.648Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rightpoint.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":"2014-10-04T04:54:25.000Z","updated_at":"2024-01-20T16:44:00.000Z","dependencies_parsed_at":"2022-08-21T04:20:42.875Z","dependency_job_id":null,"html_url":"https://github.com/Rightpoint/FRY","commit_stats":null,"previous_names":["raizlabs/fry"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FFRY","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FFRY/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FFRY/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FFRY/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rightpoint","download_url":"https://codeload.github.com/Rightpoint/FRY/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247583278,"owners_count":20962006,"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","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":[],"created_at":"2024-11-06T01:42:30.064Z","updated_at":"2025-12-12T06:23:29.685Z","avatar_url":"https://github.com/Rightpoint.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Important Notice\n\nThis repository is slated for deletion, perhaps as soon as June 1, 2016.  Please find other solutions.  \n\n# FRY: A UIKit Interaction Library\nFRY is an iOS Test Driver. The purpose of this library is to simplify iteractions with UIKit. FRY does this by providing a clear API to perform view lookup, touch interaction, typing, and idle detection.\n\nFRY also includes a library, `FRYolator`, which helps create integration tests when it is included in your target. The goal of FRYolator is to record all input to the target for later recreation. FRYolator will currently record and generate unit test commands to playback touch events, as well as Network Requests via OHHTTPStubs or Nocilla.\n\n## Lookup and Perform \nFRY commands usually consist of two parts, the lookup, which finds something on the screen to interact with, and the action -- a touch, swipe, scroll, or type event.\n\n```obj-c\n// Tap the button \"Share\" button on row 5\nFRY.lookup(atSectionAndRow(0, 5)).lookup(accessibilityLabel(@\"Share\")).tap();\n\n// Return all the image views that are inside a UITableViewCell\nFRY.lookup(ofKind([UITableViewCell class])).lookup(ofKind([UIImageView class]));\n\n// Tap the OK button inside the alert view\nFRY.lookup(ofKind([UIAlertView class])).lookup(accessibilityLabel(@\"OK\")).tap();\n```\n\nNot all commands require a lookup, since they will implicitly look for the required subview before acting.  \n```obj-c\n// Select the text in the first UITextField\nFRY.selectText();\n\n// Scroll down to row 9 in section 0 of the first UIScrollView\nFRY.searchFor(FRYDirectionDown, atSectionAndRow(0, 9));\n\n// Select the '200' and 'lbs' on the first UIPickerView\nFRY.selectPicker(@\"200\", 0).selectPicker(@\"lbs\", 1);\n```\n\nThose commands can also be more specific if a lookup is specified\n```\n// Select '200' and 'lbs' on the picker view inside of row 1 (skipping the picker view in row 0)\nFRY.lookup(atSectionAndRow(0, 1)).selectPicker(@\"200\", 0).selectPicker(@\"lbs\", 1);\n```\n\nMore Information on [Queries](FRY/DSL/Query.md) or the [Lookup Implementation](FRY/Lookup/Lookup.md)\n\n### Predicates\nFRY provides some helpful macros to create compiler-checked predicates. There is a keypath predicate helper `FRY_PREDICATE_KEYPATH`, and selector predicate helper `FRY_PREDICATE_SELECTOR`. These predicates will make sure that the keypath or selector is valid, and add a `isKindOf:` check for safety. There are also a number short-hand helpers in [FRYDefines.h](FRY/FRYDefines.h) for more common lookups like `ofKind()`, `atSectionAndRow()`, and `accessibilityLabel()`.\n\n\n### Touch Synthesis\nFRY uses strongly modeled touches to generate UIKit touch events.  This allows for simple arbitrary touch creation, and clear API's for creating common touch sequences.\n\n```obj-c\nFRY.lookup(@\"My Label\").tap();\nFRY.lookup(@\"My Label\").touch([FRYTouch doubleTap]);\nFRY.lookup(@\"My Label\").touch([FRYTouch dragFromPoint:p1 toPoint:p2 forDuration:1]);\n```\n\nMore Information on [Touch Synthesis](FRY/Touch/Touch.md)\n\n### Typing\nTyping is a separate API from `FRYQuery`, since it doesn't actually lookup any views, it just directly interacts with private API's. \n\n```obj-c\n[FRYTypist typeString:@\"Fake Input\"]\n```\nFRY will work with both the hardware and software keyboard, but the software keyboard is much slower.\n\n### Idle Detection\nThere is a helper [FRYIdleCheck](FRY/Idle/FRYIdleCheck.h) that will spin the runloop until all touches are finished and all UI animations have completed. This greatly simplifies flow control, and eliminiates the vast majority of `CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.5, false)`. If you find yourself wanting to add these to your tests, consider adding an animation to your UI instead, or providing additional application-specific checks to the delegate.  All [FRYQuery](FRY/DSL/FRYQuery.h) actions will call [FRYIdleCheck](FRY/Idle/FRYIdleCheck.h) before and after the various actions.\n\n## FRYolator\nFRYolator will be enabled when a special tap sequence is performed. Once enabled, all touch and network activity will be recorded until the tap sequence is performed again. This will save all input events that FRYolator can record into a `.fry` file. Inside the `.fry` bundle are all of the touch events and network communication.\n\n*To Enable Monitoring*\n```obj-c\n#ifdef DEBUG\n[[FRYolatorUI shared] registerGestureEnablingOnView:self.window];\n#endif\n```\n\nFRY will attempt to use relative coordinates with accessibility lookup information for the view that was touched. This will maximize the reliability of these commands when UI changes occur. If no accessibility information can be found, absoulte screen coordinates will be used.\n\n### Touch Visualization\nFRYolator can also visualize touch events. This is used by FRYolator to indicate that recording is active, but can also be easily enabled in the automated tests to aid in writing tests.\n\n*To Enable Touch Visualization*\n```obj-c\n[[FRYTouchHighlightWindowLayer shared] enable];\n```\n\nTouch visualization is automatically enabled by [FRYTouchDispatch](FRY/Touch/FRYTouchDispatch.h) if the FRYolator library is linked into the target.\n\n## iOS Support\niOS 8+ is being actively supported and tested. All of the touch dispatch code should work on any version of iOS, and the typing code should also work on earlier versions of iOS.\n\n## Installation\nAdd FRY to your Podfile to install. If you want to use touch recording, add FRYolator to your application target. Only add it to the 'Debug' configuration to ensure it is not submitted to the app store, or add it to a debug target.\n\n*Podfile with Debug configuration*\n```\ntarget :YourTests do\n  pod 'FRY'\n#  Un-comment for touch visualization\n#  pod 'FRY/FRYolator'\nend\n\ntarget :YourApplication do\n  pod 'FRY/FRYolator', :configuration =\u003e \"Debug\"\nend\n```\nThis will cause your test target to link with FRY, and link your application with FRYolator on `Debug` configurations\n\n## Influences\n\n### KIF\nKIF is amazing framework that basically started UI testing on iOS. The core design difference with KIF that pushed me to write FRY without looking to maintain compatibility is that looking up a view can modify the view heirarchy to find it. This causes a lot of bizarre issues, and it is not usually what I want from a testing perspective.\n\n### Robot\nRobot is a newer contender in the UI Testing world, and is very interesting, with a primary goal of speed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Ffry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frightpoint%2Ffry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Ffry/lists"}