Skip to content
forked from wix/Detox

Gray Box End-to-End Testing and Automation Framework for Mobile Apps

License

Notifications You must be signed in to change notification settings

gurukiran007/Detox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

detox

Graybox E2E tests and automation library for mobile

Development still in progress!

Wanna see it in action??

Open the React Native example project and follow the instructions

Some implementation details

  • We use websockets to communicate (so it should be super fast and bi-directional)
  • Both the app and the tester are clients, so we need the server to proxy between them
  • We are relying on EarlGrey as our gray-box native library for iOS (espresso for Android later on)
  • The JS tester controls EarlGrey by remote using a strange JSON protocol
  • Instead of wrapping the zillion API calls EarlGrey supports, we implemented a reflection mechanism
  • So the JS tester in low level actually invokes the native methods.. freaky
  • We've abstracted this away in favor of an protractor-like api, see detox/example/e2e/example.spec.js
  • See everything EarlGrey supports here and in this cheatsheet
  • In the future we'll use fbsimctl to control the simulator from the test, restart the app, etc

Roadmap

  • Cleaner code and refactoring once we have the basic architecture figured out
  • Improve separation of test start and test end in the native detox test runner
  • Maybe move entire mechanism to XCTestCase (instead of pure app code like now)
Troubleshooting
  1. open detox/example/ios/example.xcodeproj in xcode
  2. make sure you don't have any running RN packagers
  3. run the project by pressing play
  4. you should see an app in the simulator with "Welcome" and "Click Me" button, the iOS Accessibility Inspector might also show up
  5. if you get weird "DerivedData" errors, change the xcode "DerivedData" setting back to default
  6. if you get build problems, delete the following (since EarlGrey downloads them on build):
  • detox/example/node_modules/detox/ios/EarlGrey/OCHamcrest.framework
  • detox/example/node_modules/detox/ios/EarlGrey/fishhook
  • detox/example/node_modules/detox/ios/EarlGrey/Tests/UnitTests/ocmock

About

Gray Box End-to-End Testing and Automation Framework for Mobile Apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 63.7%
  • Java 17.6%
  • Objective-C 13.2%
  • Swift 2.6%
  • Shell 1.2%
  • Kotlin 1.1%
  • Other 0.6%