Homemade Weak Network Testing Artifact QNET Zero-Based Quick Start (Part 1)

01. APP weak network test background

During the use of the app, it is inevitable that you will encounter different weak network environments, such as on the bus, in the subway, and in the underground garage. In this case, mobile phones often experience network jitter, uplink or downlink timeouts, resulting in packet loss and delay in APP applications, thereby affecting user experience.

As a software test engineer, we need to do a certain weak network environment scenario simulation before the app goes online to check whether there are some unknown problems in the app in a weak network environment.

For example:

  • Client freezes, crashes and other abnormalities

  • Core functionality prevents the software from functioning properly

  • There is a chance of harming the interests of users or gaining additional profits from users

  • Is there a reasonable reconnection mechanism to avoid returning to the login interface every time you reconnect

  • Whether there is a reasonable retransmission mechanism, and there are corresponding reasonable prompts for packet loss delays

02.APP weak network environment traditional solution

Solution 1: Connect the mobile device to the PC for weak network testing, such as Fiddler, Charles, etc.

The basic idea is to install a Fiddler network packet capture tool on the PC, and then proxy the network of the mobile device to the PC, and perform weak network simulation by setting the delay through Fiddler on the PC.

Solution 2: Build a weak network Wi-Fi on a dedicated server

Use mobile devices to connect to the Wi-Fi for weak network testing. Related technical solutions include Facebook's ATC and Tencent's WeTest-WiFi.

Disadvantages of the above scheme:

(1) An additional PC or server is required, and the construction cost of a weak network environment is high;

(2) Additional tools need to be installed and deployed, and the weak network environment needs to be configured on a PC or on the Web, which is expensive to use;

(3) The functions of the weak network environment are not perfect. For example, Fiddler does not support weak network environments such as packet loss and jitter.

In view of the shortcomings of the above solutions, the Qnet tool can perfectly solve it, and the interface operation is also very simple and easy to use.

03. Brief introduction of Qnet weak network testing tool

  • Without the help of a PC or server, just install the QNET App on any smartphone to build a complete weak network environment

  • Real-time network data of operators covering all provinces in China and 47 mainstream overseas countries and regions, providing real 20+ weak network scenarios such as subways and elevators

  • Provides the function of network data packet capture, which is convenient for the analysis of network data problems

  • Support adb command drive, realize automatic weak network test, reduce cost and improve efficiency

04. Introduction to Qnet tool interface

1. [Login] page

Click the Qnet App to enter the login interface, check the agreement agreement and click the [QQ Login] button to authorize the QQ account to complete the login.

2. [Workbench] page

  • Click to select application

Click to select a single application, all applications

  • Weak network scenario template selection

Provides common network test templates for the system, and you can add other required weak network test templates through [Network Scene] or [Add] in the upper right corner.

  • [start up button

  • Update weak network test template

Click the text on the right side of the template to enter the edit page to support updates

  • Delete weak network test template

Slide the template to be deleted to the left, and the [Delete] button will appear, click to delete

  • Search weak network test templates

When there are many templates to add, you can enter the template name keyword through the [Search Box] above to complete the search

3. [Network scene] page

3.1 The [Network Scenario] page provides templates recommended by the system, covering commonly used extremely poor network, normal network templates, disconnected reconnection, wifi and 4G switching, 100% packet loss templates, etc. You can click [Add], and after editing - [Save], add an existing template to [Workbench] for selection and testing.

3.2 [Workbench] page and [Network Scene] page [Add] button in the upper right corner, users can select parameters to add templates. There are mainly two types: [Scene Template] and [Custom Template].

  • 【Scene Template】/【Scene Template】(Global):

Provides network selection (server location, client location, operator type, network type), scene selection (elevator, subway, high-speed rail, underground parking lot, wifi through walls, video network standards, voice network standards, etc.) , and finally fill in the corresponding [Template Description], and press the [Save] button.

  • 【Custom Template】:

A variety of weak network parameters are provided:

Network bandwidth (unit kbps, limit the maximum bandwidth capacity of uplink and downlink of the current network)

Network delay (in ms, the uplink and downlink delay of the current network is approximately equal to the set value)

Delay jitter (jitter selection is performed for each data packet with a set probability, and the delay range is randomly generated between 0 and the jitter value)

Random packet loss (drop each packet according to the set probability)

Periodic weak network (alternately switch according to the release time and weak network time, and perform weak network according to the type of weak network)

Protocol control (supports weak network control of different protocols, protocol types include TCP\UDP\ICMP\DNS)

Weak network ip (weak network control can be carried out for IP, multiple IPs are separated by |)

According to the testing needs of your company's products, you can combine and fill in the corresponding parameters, and finally click [Save].

 

4. [Settings] page

  • user logout

If you log out of the account, you will return to the login page; you need to log in again to use Qnet

  • testing report

It will take effect when the weak network is started after checking it, and it will be saved after the weak network is ended (iOS is not supported for now), and the saved file includes. csv and .html;

  • Network capture

It will take effect when you start the weak network after checking it, and save it to the corresponding file path after ending the weak network

  • Control floating window

During the test, it is convenient for users to perform quick operations such as Qnet pause and resume, switch templates, etc. If it is turned on, the control floating window will be displayed, and if it is turned off, it will not be displayed

  • Information floating window

Display the floating window of weak network test parameters. If it is turned on, it will be displayed; if it is turned off, it will not be displayed during the test

  • Documentation

Click to download the official Qnet tool PDF document

  • common problem

Will jump to the FAQ page of the official collection

  • User Agreement/Privacy Policy/Children's Privacy Protection Statement

Click to view the details of the corresponding document

  • delete account

Deleting an account will clear all templates and data under the current account

05. Summary

The above only made a detailed introduction from the background, to the solution, to the various functional interfaces of the Qnet tool. Regarding the specific application operation of the Qnet tool, let’s continue to the next article~

If you need this domestic weak network test artifact Qnet tool installation package and related materials, you can click the link below to get it for free

[Test Architect] Junior System Test Engineer-Test Architect Learning Path

Guess you like

Origin blog.csdn.net/a448335587/article/details/121146353