ios


Very large data for Xcode iOS unit tests


Summary
How do I get realistic automated unit tests for multiple large data sets for an iOS application? The more realistic the test, the harder it is to do; and using a continuous-integration server (the only practical way to conduct tests) compounds the problem.
But people do it. How?
I make a number of flat assertions. Any may be incorrect. Correcting them will go a long way toward answering my question.
Project
This is an iOS 9 application that analyzes large video files (full-resolution, maximum frame rate, 10 seconds typical) taken on an iOS device. (Part of the analysis will go through OpenCV, if that matters.)
The client has given us a proof-of-concept (Python on the desktop) and hundreds of sample files. Call it 8 GB total.
We’d like to unit-test our code against as many of these as possible. My problem is, how do we perform automated unit tests against large data sets for an iOS target?
Alternatives
The better the test, the harder it is to perform:
We’ll start with an OS X application to check correctness and relative speed. It’s easy to point the tool at any number of files. However, x86_64 has a different ABI, OS X a different API, and iOS has resource constraints the Mac won’t reproduce.
This affects both correctness and performance measures: You could go on wild goose chases for optimizations that work on the desktop but not the device. We will eventually have to use the Accelerate framework, which can’t possibly perform the same on the two platforms.
After porting to iOS, we can use the iOS Simulator, which even uses i386 (and therefore a 32-bit word) for older targets. (I explode with delight to discover that the precision of CGFloat varies between platforms.) Still the problems of ABI, performance, and constraints, compounded by the fact that the Simulator’s “iOS” API often calls through to the approximate equivalents in OS X.
Additionally, I don’t believe the simulated device can break the sandbox to read files outside the device’s tree. We must (am I right?) copy the test data into the storage of each simulated device, at paths that will differ for each developer and are not guaranteed to be stable across versions of Xcode. If that were solved, even a big machine would still have problems with n × m GB.
(We could link all the “stored” files to a common copy. The reliability and stability issues delight me even more.)
Eventually we have to test on a device, because we need unpaged memory, storage that is a small multiple of the file size, on a throttled ARM processor that changes significantly every year. Which means pushing video files through the tether, possibly seriatim. It’s unrealistic to challenge the device with hundreds (or dozens) of files, but an adequate test suite might demand 8 — enough to be cumbersome.
I’m not sanguine about there being a straightforward way to load and unload a series of files into a tethered device. I guess we might have separate test targets, each with two or three files stashed into the application data package for the Test scheme of each. I’d rather not if there’s a cleaner way.
Integration
It gets worse: Testing will be a long, demanding process, multiplied by each targeted device. It is not realistic to ask any of our developers to host the tests (everybody is BYOD and occasionally off-site, let’s not argue about it). Nor is it realistic to commit the test files to a shared repository. (GitHub flatly refuses.) That’s true no matter how you perform the tests.
This points to builds and tests on a continuous-integration server. We wouldn’t have to bear the tedium, but the practical problems of keeping a library of test data and loading it into the sandbox of the device (simulated or practical) don’t go away.
Question
I know this is a solved problem. Large-file projects for mobile devices exist. The developers test them.
How is it done?

Related Links

What is the current Parse email verification regex pattern?
How to send images and videos to server using ASHTTPRequest in ios
how to rearrange array using objective c?
swift - Twitter login button created with no completion block?
AVAnimator Assertion failure in -[AVMvidFrameDecoder advanceToFrame:] 'framebuffer num bytes'
Instagram InstagramCaption not working
Delete sections without scroll down
Facebook Login Button Throws An Error And Says I Cannot Login
In-app purchase receipt validation, “in_app” field empty
How can we pass the parameters along with block methods in objecitve-c
Apple Remote Push Notifications
Game stops working when restart button clicked
Swift - Create a custom push segue
how to set alpha on Backgroung image using Swift
Livecode revdberr invalid database connection
How to sort an array which contains objects with chars and decimals? [duplicate]

Categories

HOME
html5-canvas
collections
azure-search
serial-port
android-activity
twitter-digits
api.ai
xquery
oracle-adf
mvvm-light
android-bluetooth
documentation
stm
cytoscape.js
sonata-admin
jsqmessagesviewcontroller
accumulo
android-dialogfragment
ghost-blog
windows-applications
spark-graphx
easendmail
iteration
operator-keyword
svn2git
jtapi
delete-row
jsonstore
wso2iot
consistency
qmake
spark-submit
qmenubar
log4perl
requirements-management
master-data-management
typesetting
sshd
playback
facebook-canvas
informatica-cloud
hapi.js
evaluate
sizeof
rsh
groups
uploadify
win32com
json4s
oboe.js
android-listfragment
viennacl
pegkit
stringr
android-print-framework
alt
computer-science-theory
boxapiv2
esx
epoll
monk
bunny
pkcs#10
nitrogen
cellular-automata
jquery-backstretch
jqgrid-php
dotliquid
onejar
execcommand
mips64
loadlibrary
source-highlighting
letter-spacing
httpcontext.cache
settings.bundle
dired
retain
directoryentry
nscollectionviewitem
nstreecontroller
system-tray
xoom
regexbuddy
queryanalyzer
utility
gedcom
iphone-sdk-3.1
newsgroup
code-statistics
greensoftware

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App