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 )


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

http://sama7b.com/up/viewimages/f231a7e084.jpg 




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

http://www.sama7b.com/up/viewimages/b634df493d.jpg






















http://sama7b.com/up/viewimages/55f0df6eb7.jpg


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


http://sama7b.com/up/viewimages/87b888bd63.jpg

 
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





http://sama7b.com/up/viewimages/e12a5effaa.jpg


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


http://sama7b.com/up/viewimages/1b3f744e08.jpg



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

No comments:

Post a Comment