I'm pretty sure it's working properly....

The frontmost thought in every code monkeys mind when it's time to ship.

So what can we do to move from "I'm sure" to "I know"?

It's fine to have a test plan and a group of beta testers to put each release through its paces but how can you know that all the bugs have been squashed and no old ones have returned?

An answer to this conundrum comes in the form of Unit Testing, the basic idea is to have a separate application that uses the libraries and objects from the target application to test the functionality of that application. 

Typically the test application is run as part of the build system and gives instant feedback to the developer on the state of the tests, this way, when a code change is made you can be sure that the tested functionality is correct and no new or old bugs have crept in during the change.

Unit testing, rather than providing a complete solution to the problem is a foundation on which more powerful methods can be built.

There are two commonly used techniques built on top of (or used in combination with) Unit Testing that are worth exploring further, they are :-

 

TDD is a form of Agile development in which the developer performs a series of iterations in which a modification or new feature begins life as a small series of tests that exercise the required functionality (this will initially fail as the code has not yet been written), code that satisfies the test is then written and on each successive iteration the code is refined and developed first with tests and later in code. The advantage of this method is in forcing the developer to break the problem into bite sized pieces and think clearly about the functionality of each bite in isolation. The resulting code tends to be clean, concise and coupling between pieces is kept to a minimum.

CI often involves the use of a build server that periodically takes the current source tree for an application and performs a build and test cycle, the results of the tests are then typically sent to all the developers. Current best practice recommends checking changes into source control frequently (often multiple times per day) in order to prevent "Integration Hell" that comes from trying to merge multiple changes from many developers all at once. It is not uncommon for the CI process to be performed on every code checkin.

In the iOS (and larger Objective-C) world Unit Testing support is available in Xcode through the open source SenTestingKit framework, there are also third party frameworks like OCMock and Frank

Some interesting articles on TDD & Unit Testing

 

 

Our first app under our own brand!

After having spent 100's of hours toiling away on iOS Apps for clients we are now starting work on a series of apps under our own brand.

The first app will be a Vehicle Logging app, although there are a number of these in the App Store we feel that we can make a worthwhile contribution in this space.

Watch this space as the app takes shape and see our process in action.

The first pass of our 1.0 feature list is as follows

  • Logging of trips, fuel, services, expenses
  • Use GPS for trip start/end (Save location with a bookmarked name, find bookmarks that match current location)
  • Save frequently used start/dest pairs for fast entry
  • Optionally add a return trip automatically
  • Tracking vehicle fuel efficiency
  • Optionally track fuel type
  • Optionally track average trip lengths
  • Maintain a record of services
  • User may enter a service schedule or pick a default
  • Remind user when a service is nearly due and once the time/distance has passed
  • Generate reports for expenses claims (Reimbursement for trips given a per km rate, expenses etc)
  • Reports in csv, xml, html, pdf
  • Allow customer configured templates
  • Reports can be emailed, printed, sent to Dropbox
  • Data sync to Dropbox or iCloud
  • Local notifications for service reminders

Next step will be to start sketching UI concepts