Pages

2/16/2012

How to Test iOS application on instruments

How to Test iOS (iphone/ipad) application on instruments for (Leak and allocation tests)

Firstly and before talking about using instruments steps we know that any application must be minimally tested for Leak and allocation test before uploaded to the appstore , in-addtion ..Apple sometimes reject application for developers because the memory leaking are huge.

Good application must not contains any memory leaks , this will reflect how the developer taking care about the application quality .

So, Lets start with the steeps for Memory leak (and other test types can be done with the same way )

Lunch the Xcode and open the project you want to test to Lunch Xcode click on Xcode icon as the following image

2. At the Top left of the screen you can notice the play (run) singe ,
by the left mouse button click on it and keep holding the mouse button until
small list appears as the following images

3-from the list chose the option named “Profile” ,usually it will be before the last option on the list

4-At this point the instruments app must be lunched and you know must see the instruments testing options as the following image

5- Now you must be carful and be sure that you select all option (or Memory)

from iOS Simulator , after that you must choose the type of test you need (we will chose Leaks test) , and finally you must press profile button as the following image

By now your app will lunched on simulator and your screen will be like the following

You can compare the cycled values (Live Bytes and overall Bytes)

if the to results are equaled this mean you are did not leak any memory,
if not (overall bytes bigger than Live bytes) that for sure means your application leaking memory