Showing posts with label automation. Show all posts
Showing posts with label automation. Show all posts

Saturday, April 9, 2011

How to Upgrade Test in the iOS Simulator

For the purpose of upgrade testing in automation it's useful to have a build of the previous version of the application. Of course, for actual device installs this is easy with the use of adhoc builds and .ipa files, but for the Simulator this is a little more involved. It is feasible if you follow the following steps.
  1. Launch the Simulator (/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app) and set the hardware and version to the appropriate settings.
  2. Delete any existing apps in the simulator.
  3. Put a breakpoint in the main function (i.e. first line of the main function main.m). This is to ensure that no code writes any files to the build directory (i.e. CoreData, Analytics, Preloading URL's, etc.).
  4. Run the project in debug and stop the program once it reaches the breakpoint in the main function.
  5. At this point if you followed step (2) and only have one application it should be easy to locate in ~/Library/Application Support/iPhone Simulator/[version]/Applications and can easily be tar'ed up and archived and moved around.
Now in an automated testing script you can remove any applications from the simulator, untar the appropriate archive, exercise preloading (i.e. logging in) to get the simulator in a state to test an upgrade. Now, simply build the project and have it install over this version and test any upgrade scenarios.

This has even worked from Xcode 3.2.6 builds being applied to Xcode 4.0.1.

Tuesday, April 5, 2011

iPhone Open Source Automation

Testing iPhone apps is always thought of last and is typically performed manually. At Lolay we believe in a strong automation investment to allow testing as we develop so that we can have confidence in the stability of our builds as we develop.

Checkout a demonstration of how to automate the iOS platform / iPhone using all open source. This is all compatible with ANT and Maven in any continuous environment. In this demo you will be shown on open source can perform a basic test in Where U At? and run through both positive and negative testing. At the end you can see the JUnit results including screen shots of the failure.

Vimeo: How to automate the iPhone using open source