Personally, for the specific test, original aim is the strategy, or the design of the scheme. For the execution steps-expected results, and so on, this is the most important part of the design process, and Apple provides iOS developers with a powerful toolkit for instrument, but the use of tools is not to say that they have learned a specific technology, the strategy is always the focus.
Test start:
1 under the test is my own write an app, not as expected is the problem (I began to learn OC soon, but also before the scripting language more, for the mobile side of the test a little bit, so only to start learning oc), we will use allocation for memory testing
2 understand requirements, develop test plan (self-guided self-acting ~ ~):
1) Requirements: Colorful graphic master (the actual content is not so cool--), is a self-customization (because I often sleep late, want to help hypnotize myself)
@1, through the unique wonderful selection of pictures, by their favorite music hypnosis, let oneself sleep easily, (custom, because I am so 2--good coax)
@2, click on one, Next, switch to GIF, and the music will change.
2) test Plan: < test steps > Click Next, Mark Memory, last 4-5 times, observe memory. < expected results > no memory growth
3 Perform the test:
1) Open allocation
<Allocation>
2) Select app-and observe the strategy change to generations, then click on the upper left corner of red dot--drive
3) Execution:
@1 start the app and wait for stability-click Mark
@2 Click < next Zhang; after the stable mark (here is stable, you can see the stable value through the above observation interface graph)
@3 repeat the second step 4-5 times
@4 Click on the upper left corner to close, enter the analysis
4) Analysis:
@1 as seen, after each execution here there is an increment of about 1M, the middle of our reference from the second beginning.
@2 generally, after the first mark is started, there may be some resident singleton in the value that exists here, so it should not be considered, so we are the second mark to start
@3 the 2-3-4-5 mark. (Select all VM regions at the bottom)
@4 can see that every mark has a vm:malloc_large that is the head of every increment we make, and that's why we're in memory growth.
@5 now, set him open, and you can see that the memory of this demand is the bulk of it
(people do not pay attention to my Beginner app code, write an example really or reluctantly, I will strengthen my OC ability, mutual encouragement ha)
This is the use of allocation in my usual work, but, test, always heavy in communication.
iOS test prerequisite skills, instruments-allocation test memory