Topic: unit testing

Asterisk-Java Testing with Groovy

iPhone in Dock

Recently I have taken a bit of a detour into the world of telephony, working with Asterisk-Java, which by itself is a very valuable tool, and worth knowing a bit about if you are integrating a system with Asterisk. While it is a Java-based library, I am integrating it into a Grails application.

We have a fairly comprehensive suite of unit tests asserting that desired behaviors are triggered upon certain events initiated through the Event API. This is made even easier, as usual, with Groovy-- specifically on the testing front. Here I show two hypothetical test cases, followed by supporting code that works specifically with the Asterisk-Java classes...

Continue reading »

iPhone SDK: Testing with TextMate & GTM

iPhone in Dock

Developing in Xcode, I keep my project default "SDKROOT" and Target set to the default for the iPhone device and 'Release', respectively.

That said, I have been trying out TextMate as an alternative to Xcode, thanks to all of the great things TextMate provides (I won't go into all that here, since there are already many great resources on the web). For those iPhone developers who are new to the Mac platform, or to TextMate for that matter, here's a quick tip (and be sure to check install Xcode bundle first).

First, as always, an obligatory shout-out to Google Toolbox for Mac. I am testing my code with GTM, and set the following environment variables so that Xcode plugin for TextMate could run a build / tests accordingly.

  TM_BUILDSTYLE = "Debug"
  TM_TARGET = "Test SDKROOT=Test SDKROOT=iphonesimulator2.1"

This presumes you followed the GTM directions by creating a 'Test' target to run your tests, and also that you are targeting the 2.1 version of the iPhone simulator's firmware. Replace that last argument with 'iphonesimulator2.2' if you are targeting the recently released 2.2 firmware.

With these two settings, everything works great. I can write a bit of code, and run the build. Xcode definitely does a lot, and has its place in development, but I feel that the ease of use in TextMate outweighs the code completion of editing files in Xcode in cases where the code that I am working with is familiar to me.

Wherever I am working with new API's or need to constantly refer to documentation, Xcode is still worth it, particularly after you map some essential keyboard shortcuts (but that's another post). For familiar API's however, you can't beat the productivity gains of just coding in TextMate.

Related Services: iPhone Application Development, Custom Software Development

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com