What are the differences between ios and androis in APP testing? What should you pay attention to?

1. Different operating mechanisms

IOS uses thesandbox running mechanism, and Android uses thevirtual machine running mechanism< /span>.

1. Sandbox mechanism:

Concept:Sandbox is a security mechanism used to prevent different applications from accessing each other

Function: is to store data. Each sandbox is equivalent to the system directory of each application

Core:sandboxPermission restrictions for applications to perform various operations

describe:

  • Each application has its own corresponding sandbox, and the scope of activities of the application is limited to its own sandbox.
  • Each application cannot access each other's sandbox other than this application (APPs cannot communicate with each other, they can only communicate through URL Scheme)
  • Access permissions are required when accessing data in other people's sandboxes. Data requested by the application must pass permission detection. If the conditions are not met, it will not be released.
  • Used to save non-code files such as images, icons, sounds, images, property lists, text files, etc.

 

2. Virtual machine mechanism:

  • Android itself is not built for touch screens, so all applications run in a virtual environment. The bottom layer transmits data to the virtual machine, and then the virtual machine passes it to the user UI. Any program can easily access other program files. .

2. Different ways of handling app memory consumption

Apple's applications will receive memory warnings when memory consumption is too high. If not handled in time, the application will automatically exit. Unlike Windows systems, viruses or Trojans will continue to consume memory until the memory is gone. machine.

3. Different backend systems

No third-party program in IOS can run in the background; any program in Android can Run in the background and will not close until there is no memory

The background of iOS is a pseudo background. The iOS application is sent to the background, its main thread will be suspended, other processes will have a little time to process data, and then all threads will be suspended.

The background mechanism of the iOS system can be roughly divided into 5 states:

  • Not Running: The APP is not started and is not running in the background;
  • Active: The user is using the APP. For example, when we chat on WeChat and read the web, the APP is in the Active state;
  • Inactive: This is a transitional state. Although the APP is open, the user does not have any interaction with the APP;
  • Background: The APP runs in the background, and WeChat will receive messages when it is not open;
  • Suspended: Although the APP is running in the background, it is in a dormant state and only takes up a little memory.

 

All Android applications can run in the background.It will not be closed unless the user manually operates it or there is insufficient memory. Applications on Android are equipped with Independent virtual machine, that is, every time you open an application, an independent virtual machine will be opened. Each app has its own process, and each process has its own memory space< /span>

Android processes are divided into five types from high to low:

  • Foreground process: The process that is interacting with the user, generally speaking, it is the process you are currently using the app;
  • Visible process: can be seen by the user, but does not interact with the user. For example, an activity covers the current activity in the form of a dialog box. The current activity can be seen by the user, but does not interact with the user;
  • Service process: I believe everyone is familiar with this, which is what we often call service. It can run in the background, and common ones include music apps;
  • Background process: Note that this background process should not be confused with the service process. It means that the current app is running in the background. For example, if I start the app and then click home to return to the desktop, the app will be switched back to the background. process;
  • Empty process: Empty process means that nothing is running inside these processes. The only purpose of retaining such a process is to serve as a cache to shorten the startup time required for the next time the application runs components in it.

4. Different highest authority instructions

  • The highest authority for UI commands in IOS

  • Data processing instructions have the highest authority in Android

5. Different push mechanisms

  • iOS can still receive push messages when the software is closed
    Of course, mobile messages are pushed to our mobile phones through the server. For iOS users, Apple has The APNs server is responsible for pushing messages. When you use the APP for the first time, you will be asked whether to receive notifications. If you choose yes, the server will record your ID. When there is a message notification, the data is first pushed to Apple's server and then passed through Apple's APN server pushes it to the user's mobile phone. This design allows you to receive message notifications when the software is completely closed. On the one hand, it frees up memory and on the other hand, it does not delay receiving messages.

  • Android cannot receive push information when the software is closed

    For Android phones, Google also has a similar GCM server to push messages, but because domestic mobile phones do not have Google services, they cannot receive messages pushed by Google's GCM server.

    Android push is implemented through services. Even if the application is not started but the service is still there, you can still receive push. Therefore, Android can only start Services to implement push. When the application is killed, Services will not be able to receive push if it is killed.

6. Different grabbing methods

  • iOS debugging requires xcode

  • Android uses adb

 

7.GrayscaleDifferent release mechanisms

  • ios grayscale mechanism

    It is to move the same package from 1% to 100% in seven stages within seven days.

    You can also put it directly to 100% during the grayscale process.

    When an online bug is found in this package, the package delivery progress can be paused. After the bug is corrected, a new package can be uploaded.

  • Google grayscale mechanism

    You can specify a grayscale for a package, and then gradually increase the volume to 100%
    You can also specify different volumes for different rc packages and send them to the full volume

8. Different review mechanisms

iOS contract review is strict and often rejected

  • There is no return key in ios

    When testing Android, you need to pay attention to whether the feedback after clicking the return button is correct.

  • ios is relatively smooth

    Adaptation testing, more on Android, less on ios

The resource library in the new iOS system is not fully compatible with applications in the lower version iOS system. Applications in the lower version iOS system call the new resource library, which will directly cause a crash. 

 

Thank you to everyone who reads my article carefully. There is always a courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly:

These materials should be the most comprehensive and complete preparation warehouse for [software testing] friends, and this warehouse also accompanies Thousands of test engineers have gone through the most difficult journey, and I hope it can help you!Friends in need can click on the small card below to receive it 

 

Guess you like

Origin blog.csdn.net/kk_lzvvkpj/article/details/134896266