Packet capture tool Charles (3) - interface introduction, basic functions (weak network, editing, resending) of the tutorial

  • Charles is one of the common packet capture tools
  • This article introduces the common functions of Charles
  • After mastering the functions introduced in this article, most of the packet capture needs in the work can be met.

1. Interface Introduction

  • The main interface of Charles is divided into the following parts: menu, tool, interface list, detailed information
    insert image description here

(1) session

  • Every time Charles is started, a session (Session 1) is created by default

  • insert image description here

  • Captured interfaces are also displayed under this session.
    insert image description here

  • Most of the time, using one session is sufficient.

  • If you want to create a new session, select the "File - New Session" option from the menu bar. Most operations on the session are also under the "File" menu.
    insert image description here

  • After selecting, you can see the newly added session.
    insert image description here

  • The session marked with "*" is the session that is recording the capture interface.

  • The recorded interface can be selected to be printed under that session by pressing the record button.
    insert image description here

(2) List of captured interfaces

  • The most important part of Charles is to view interface requests and interface responses
  • The interfaces captured by Charles are displayed in the session in two different ways: structure view (structure) and sequence view (sequence).
  • The structure view shows requests by host and folders/directories within the host, and then view folders/directories within the host.
    insert image description here
  • Sequence View displays interface requests in the order in which they occur.
    sequence view

(3) Interface details

  • Select an interface to view its detailed information.
    insert image description here
  • Under the "content" tab, the contents of the interface request and response are displayed
    insert image description here
  • The specific interface information includes:
    • Related header information:
      • Query parameters
      • Form parameters
      • Cookies
      • Authentication
      • JSON headers
    • Text content related:
      • XML
      • AMF
      • Form parameters
      • JSON
      • Compressed data (compressed data, used to view the original compressed body)
  • The content display can be switched through the bottom tab
    insert image description here

(4) chart (chart)

  • Select any interface, path, or host, and you can view the request duration of the included interface, which is displayed in the form of a graph plus time.
    insert image description here
  • The information contained here is:
    • Time spent sending the request (dark blue)
    • Time spent waiting for network latency or processing time on the server (medium blue)
    • Time taken to receive a response (light blue)
      insert image description here

2. Toolbar

(1) "Clear" button

  • The button is located in the upper left corner of the pageinsert image description here
  • After clicking, the interface of the current session will be cleared
    insert image description here

(2) Record button

  • The recording captures the main functions of the interface Charles.
  • When the record button is on, the request and response will be recorded in the current session
    insert image description here
  • The scope of logged requests depends on Charles' configuration.
  • Typically, this would include all HTTP and HTTPS traffic from your browser, as well as other applications on your computer.
  • If recording is turned off, Charles will pass through all requests as normal, and these requests will not be recorded in the session.
    insert image description here

(3) SSL proxy switch

  • This button is equivalent to "Enable SSL Proxying" in SSL Proxying Setting

  • Just leave it on

  • open state
    insert image description here

  • Disabled
    insert image description here

(4) Weak network function switch

  • When the weak network switch is turned on, the interface request response speed will be limited according to the set network speed
  • open state
    insert image description here
  • Disabled
    insert image description here
  • The network speed when setting a weak network can be set in "Proxy - Throttle Settings"
    insert image description here
  • Specific content that can be set
    insert image description here

(5) Breakpoint switch

  • In the enabled state, it will pause at the breakpoint according to the setting
    insert image description here
  • Disabled
    insert image description here
  • The location of the breakpoint setting is "Proxy - Breakpoint Settings"
    insert image description here
  • You can add interfaces and breakpoint locations that require breakpoints here
    insert image description here

(5) Edit interface

  • Select an interface and click the edit button to edit the interface
    insert image description here
  • After editing, you can resend the interface
    insert image description here

(6) Resend interface

  • Select an interface and click the resend button to resend the interface
    insert image description here

(7) Verify the selected response

  • After selecting the interface, click the button
    insert image description here
  • After clicking the button, a new dialog box will pop up to display the verification information
    insert image description here

(8) Tools menu

  • Display the tool menu after clicking the button
    insert image description here

(9) Setting menu

  • Display the settings menu after clicking the button
    insert image description here

Appendix: Interface Functional Testing Series Tutorial Contents

Packet capture tool Charles (1) - download, install and set up
packet capture tool Charles (2) - mobile APP packet capture (set up mobile phone proxy, install certificate)
packet capture tool Charles (3) - tutorial interface introduction, basic functions ( Weak network, editing, retransmission)
Packet capture tool Charles (4) - Introduction to common functions (save, import and export, filter, sort)
Packet capture tool Charles (5) - Use local mapping to modify interface response content (Map local)
Packet capture Tool Charles (6) - use remote mapping to redirect interface requests (Map remote)

General Catalog-Zero-Basic Getting Started Interface Functional Testing Tutorial
———————————————————————————————————————————————————
Charles installation package has been uploaded to I run a blog with the same name as the public account [Software Testing Essential Skills].
The public will also upload test-related materials from time to time, and they can go to collect them if necessary.
insert image description here
If necessary, click on the QR code at the bottom of the article to get it~insert image description here

Guess you like

Origin blog.csdn.net/weixin_40883833/article/details/129172661