Mobile app Test "3"-performance test

Source: Internet
Author: User
Tags benchmark

Performance testing

Functional testing of mobile products, as well as automation of functional tests, verifies the correctness and availability of functional aspects of the tested product

Applicable situation:

When the App is in use, stutter

When querying information or performing an operation, it takes a long time for the server to respond

When application use peak, application frequent error

The App is used for a period of time, memory consumption is too high, or even flash back

Mobile Access App interface, open very slowly

In order to avoid the above risk, usually, in the test phase, the performance test, to obtain the test data, so as to facilitate the performance of quantitative analysis, but also facilitate the comparison of the collection

Performance testing is carried out and the characteristics of the system under test, closely related to the composition of mobile Internet products, performance can be divided into the performance of the front section and background interface performance

Front End: Web page and native app code [Android && iOS]

   

First, the Web front-end performance testing

1) M Station, enter the same address, follow the PC or Mobile return different content

user-agent [http Header] field via HTTP, 302 Response code for HTTP protocol and corresponding jump mechanism

2) Many apps are mixed, both native code and embedded Web pages

Mobile Browser PC Browser | App Embedded Browser [Eg:webview]

HTTPS = HTTP + SSL [Secure Socket Interface Layer]

Uri:uniform Resource Identifiers

HTTP Request Method:

GET, POST, PUT, DELETE, top 4 common HEAD, TRACE, CONNECT, Optoins

Http-version

Status-code:

1xx:tip Info

2xx:success

3xx:redirect

4xx:client Error

5xx:server Error

Eg:

200:ok

400:bad Request,

401:unauthorized

403:forbidden

404:not Found

500:internal Server Error

503:server unavailable, the server is currently unable to process client request and may return to normal after some time

"CDN"

    

Accept-encoding, identity, whether using gzip compression, shortened after compression for the original 1/3, the client, can be faster to get off the content, thus shortening the page opening time, compression is bidirectional, the client and the server need to open

    

Web Front End Performance test method

Http front-end common performance testing tools: Fidder, YSlow, HttpWatch, Firebug

Common Web performance Testing tools:

Online tool Webpagetest

Chrome PC/Phone remote Test call

chrome://inspect/#devices

Two APP End performance testing

Analysis of memory and performance of Web Components embedded in the APP

1 Memory analysis

The first step is to understand the JVM garbage collection mechanism

Garbage collection mainly includes

Static variables, heap memory objects that are pointed to on the stack, registers, other

In some cases, garbage collection threads also compress memory fragments, where the memory allocator records where free memory begins, and then allocates memory sequentially

2 several references to Java

Strong references

Weak references

Soft references

Other

3 Android Memory Footprint Analytics Practice

MAT: Powerful head dump memory analysis tool

Eclipse's DDMS, Android Studio DDMS can be crawled

Run Memoryanalyzer, open Fetch. hprof file

Care:

Large Object resident Memory: Open Dominator Tree for entire heap

Memory leaks

4 IOS Memory Problem analysis

Memory management for IOS uses reference counters

Arc:automatic Reference Counting: Main help developer release space

But it doesn't mean that the app developed using the ARC mode has no memory leaks.

5 performance analysis of the APP's embedded Web Components

1) Android WebView performance analysis

2) IOS Webiew performance analysis

iOS's WebView internal engine differs from Safari because the iOS WebView does not support JavaScript acceleration, so performance is much worse

    

Third, background service performance test

Performance testing Objective: To quantitatively assess the response time and capacity of the system under test metrics

According to the emphasis, can be divided into

Loading load test:

Pressure Press test:

Endurance endurance TEST:

Scalability Scalability Testing:

Benchmark benchmark test: TCP && SPEC

2 Impersonate a user request

Jmeter

Think time

Building a simulation user group

Setting the test flow

       Select a data sample, concurrent volume

  

Mobile app Test "3"-performance test

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.