With Charles to test mobile end - Part II

Benpian half piece is tested by means of the movable end Charles. ( Part door at any point I )

Speaking last can make use of a network request came Charles mobile side, then, we look at how to simulate return by Charles, or in the web version of watercress example.

First find the requested web version of watercress

 


 

Through the above sentence, we know that the request to a folder was arrested watercress movie file, we go to find specific movie in return.

 


 

You can see, we need all the information in this request, we can choose a movie page for testing, we have to help Charles breakpoint function, to make a break on this request.

 


 

After playing a breakpoint, the breakpoint need to do some configuration.

 


 

We just lay the selected breakpoint, double-click the point to open.

 


 

Leaving only the response, the request to remove, if the latter requests need to do the simulation, you can request reservations on the breakpoint.

 


 

After the breakpoint configuration is complete, we have to practice it. When we re-request watercress movie, breakpoints work, and this time the page is in a wait state, click execute, the page can return to normal.

 


 

Next, we modify the return value

 


 

 

 

Click execute, returns the modified information to the front (because of network problems, sometimes need to develop a network request to delay a long time to adjust to the use of mock test, very good luck here, once modified a success).

 


 

 

 

Sometimes when the mobile terminal testing, need to simulate weak network environment, Charles simulation can help us

 


 

We can only choose the speed limit to a specific host, here we directly select a limiting case, 56 kbps

 


 

Here we direct request watercress page, you will find mobile end response becomes very slow

 


 

So that we can test different network environments the aid of Charles.

With Charles to move to end testing of little tutorial on here, hoping to help to you, if you want to know what the future, please leave a message. Finally, I hope this article can help you.

Author: Testfan Chris

Source: micro-channel public number: automated software testing platform

Copyright: welcome to reprint, but must indicate the source and gives links to articles in the apparent position of the article page

Guess you like

Origin www.cnblogs.com/testfan2019/p/11491313.html