- 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.
Article directory
1. Interface Introduction
- The main interface of Charles is divided into the following parts: menu, tool, interface list, detailed information
(1) session
-
Every time Charles is started, a session (Session 1) is created by default
-
Captured interfaces are also displayed under this session.
-
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.
-
After selecting, you can see the newly added session.
-
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.
(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.
- Sequence View displays interface requests in the order in which they occur.
(3) Interface details
- Select an interface to view its detailed information.
- Under the "content" tab, the contents of the interface request and response are displayed
- 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)
- Related header information:
- The content display can be switched through the bottom tab
(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.
- 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)
2. Toolbar
(1) "Clear" button
- The button is located in the upper left corner of the page
- After clicking, the interface of the current session will be cleared
(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
- 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.
(3) SSL proxy switch
-
This button is equivalent to "Enable SSL Proxying" in SSL Proxying Setting
-
Just leave it on
-
open state
-
Disabled
(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
- Disabled
- The network speed when setting a weak network can be set in "Proxy - Throttle Settings"
- Specific content that can be set
(5) Breakpoint switch
- In the enabled state, it will pause at the breakpoint according to the setting
- Disabled
- The location of the breakpoint setting is "Proxy - Breakpoint Settings"
- You can add interfaces and breakpoint locations that require breakpoints here
(5) Edit interface
- Select an interface and click the edit button to edit the interface
- After editing, you can resend the interface
(6) Resend interface
- Select an interface and click the resend button to resend the interface
(7) Verify the selected response
- After selecting the interface, click the button
- After clicking the button, a new dialog box will pop up to display the verification information
(8) Tools menu
- Display the tool menu after clicking the button
(9) Setting menu
- Display the settings menu after clicking the button
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.
If necessary, click on the QR code at the bottom of the article to get it~