Skip to main content

xcrun simctl - like ADB but for the other guys

So I'm definitely not an iOS guy. I barely have the bandwidth to keep tabs on the latest and greatest features of the consumer-facing stuff. Keeping in touch with the developer/tester tools is hard too. So it shouldn't be a surprise that I'm just now finding out about xcrun simctl

If you're an Android guy and you're familiar with ADB, this is a LOT like that. In fact, after looking through the documentation on xcrun simctl and reading up on it on StackOverflow, it occurred to me that it is finally possible to do what I do on Android with my favorite script ever but on iOS devices/simulators instead. For reference, here's my blog post about that script.

The bottom line is that as a tester who regularly uses multiple devices concurrently, the shell script in conjunction with TextExpander is a massive time and mental-space saver for me, making me a whole lot faster and more effective at my job. If you're an iOS tester or you know someone who is, do them a favor and point them at that. If you're an iOS developer and you want to build a highly testable app, consider how powerful custom URI handling along with "xcrun simctl openurl" will be for your project.

Short. Sweet.

In completely non-iOS news, my blog post on using the Factory Pattern for addressing system UI fragmentation in your UiAutomator tests is forthcoming. I've got quite a bit of sample code to put together since I'll be publishing a whole test project, some build/deploy/run scripts, screenshots galore, and all that work takes time that is in short supply these days. Please bear with me. I hope it will turn out as awesome as it seems like it is in my head.

Comments

  1. Okay, let me be clear: I know that xcrun simctl didn't break completely new ground on iOS. It DOES simplify what used to be a fairly unwieldy nightmare though. One area I'd love to see them improve is in making the output more script-friendly. "xcrun simctl list" returns a bloated and unwieldy blob of crap compared to "adb devices". Still though, it is fairly obvious that the new hotness is an improvement and I look forward to any progress Apple makes in that area.

    ReplyDelete
  2. Personally I use libimobiledevice for iDevice scripting:

    http://technotesonthego.blogspot.com/2013/10/install-libimobiledevice-on-mac-os-x.html

    ReplyDelete

Post a Comment

Popular posts from this blog

UiAutomator and Watchers: Adding Async Robustness to UI Automation

"I'm looking over your shoulder... only because I've got your back." ~ Stephen Colbert After my recent UiAutomator review a user brought up an important question about the use of UiWatcher. The watchers serve as async guardians of the test flow, making sure the odd dialog window doesn't completely frustrate your tests. Having a tool that automatically watches your back when you're focused on the functional flow of your tests is awesome. 100% pure awesomesauce. Since the API documentation on watchers is scant and the UI Testing tutorial on the Android dev guide doesn't cover their use in depth, I figured I should add a post here that goes over a simple scenario demonstrating how to use this fundamentally important UI automation tool. In my example code below, I'm using uiautomator to launch the API Demo app (meaning run this against an Emulator built in API level 17 - I used the Galaxy Nexus image included in the latest ADT and platform tools). ...

UiAutomator.jar: What happened when Android's JUnit and MonkeyRunner got drunk and hooked up

"Drunkenness does not create vice; it merely brings it into view" ~Seneca So Jelly Bean 4.2 landed with much fanfare and tucked in amongst the neat new OS and SDK features (hello, multi-user tablets!) was this little gem for testers: UiAutomator.jar. I have it on good authority that it snuck in amongst the updates in the preview tools and OS updates sometime around 4.1 with r3 of the platform. As a code-monkey of a tester, I was intrigued. One of the best ways Google can support developers struggling with platform fragmentation is to make their OS more testable so I hold high hopes with every release to see effort spent in that area. I have spent a couple days testing out the new UiAutomator API  and the best way I can think of describing it is that Android's JUnit and MonkeyRunner got drunk and had a code baby. Let me explain what I mean before that phrase sinks down into "mental image" territory. JUnit, for all its power and access to every interface, e...

Why Developers Shouldn't Perform Software Testing - A Rebuttal

Take a minute and read the following 2-pager entitled " Guest View: Why developers shouldn’t perform software testing ". Man, I tried to like this article because the author, Martin Mudge, clearly knows that businesses who undervalue quality by trying to eliminate testing through simply shuffling the traditional testing task to developers are making a huge mistake. Unfortunately he begins by making an assertion that testing overburdens a developer which at face value is complete nonsense. If you feel overburdened, it is a timeline issue and that is true no matter WHAT the nature of the tasking is.  So his assertion of “one the most important” contributing factors being overburdening the developers is massively flawed. It gets immediately worse from there because his second point is about time constraints.  Mr Mudge just gets so much wrong. What he really should be shooting down is the idea that testing, as a cost-center not as a task, can be eliminated by having your p...