34. Automata Background
Functional testing framework
Developed in-house
Run tests locally or using Jenkins
Python API
Rich set of libraries to simplify automation
High productivity
30
35. Automata Benefits
Separate process enables inter-app testing
Single test can manipulate two apps
Automating screenshots and screenshot diffs
Objective-C experience not required
Hooks into Objective-C runtime
31
42. Issues
File names of stored files are Dropbox paths
Unusually long file paths
Unsupported unicode characters
File loading race conditions
Providing readwrite access to file refs
37
43. /*
* Hello there, friend. I wish you luck in your voyage through the following code.
*
* We need to avoid doing disk I/O in this callback, because it will be called in quick succession
* repeatedly on photos tab as we load lots of thumbs. Since we're on the main thread right now,
* we can't afford to do costly disk I/O. It will seriously impact scroll performance on photos tab
* if we do.
*
* The following code checks to see if what we just loaded has only a thumbnail repr. If it does,
* it updates the cacheSize property of the file to -1. -1 is a special flag, indicating to the LRU cleanup
* mechanism that this file doesn't need to be purged from the disk during LRU cleanup.
*
* Why not cleanup these files during LRU cleanup? Because with the release of photos tab, we may
* have thousand of files on disk. And starting them all during LRU cleanup is much too slow. So,
* we've opted to just not clean up files that only have thumbnail reprs.
*
* This code is not "correct". For example, if you load a thumbnail *AND* the BestFit repr, the thumbnail
* could now be cleaned up during LRU cleanup.
*
* This is basically a huge hack to make scrolling performance not stutter in photos tab.
*
*/
38
44. /*
* Hello there, friend. I wish you luck in your voyage through the following code.
!
* This is basically a huge hack to make scrolling performance not stutter in photos tab.
*/
39
45. Goals
Ensure file name integrity
Operations on separate queue
Smarter file loading system
Defensive return values
40
47. Implementation
Store files by UUID instead of Dropbox path
File Cache on background serial queue
Return immutable stubs of file refs
LoadingFileManager
42