I want to write UIAutomation (JavaScript based) tests for a rather complex iPhone App. I dont't want to use one single huge file, but to seperate the testing functions and helpers by using several files. Is that possible at all? How do you structure your UIAutomation tests?
Hey.
Yes it is. Although import
keyword is not implemented for JS in browsers, it is implemented in Instruments. You just write #import "somefile.js"
in 'master' JS file which you run with Instruments. I haven't tried to include file from locations other than original file you're providing to instruments, but sub folders for that location work.
Look a following example based on this post:
#import "fileInTheSameDirectory.js"
#import "SubDirectory/fileInSubDirectory.js"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With