If you don't understand the front-end and back-end interaction, you want to be proficient in locating bugs, stop making trouble!

As a qualified software tester, it is one of the necessary skills to be able to locate the position of the bug in front-end or back-end. So you need to understand how the front-end and back-end data interact.
Insert picture description here
1. Website data processing is mainly divided into three layers:    The
 
  first layer is the presentation layer. This part can be implemented with HTML code, CSS/Javascript code, etc. The layout and design of web pages can be realized through front-end code. This layer can also be called the display layer. That is, you can open the webpage you can see with the browser.
  The second layer is the business layer, which is responsible for processing data. Commonly used code languages ​​are PHP, JSP, Java, etc. Through these background processing language algorithms to process the data returned by the foreground. Operate the database when necessary, and then return the results to the front-end web page.
  The third layer is the data layer, this is the database, used to store data. The operation of adding, deleting and modifying the database can be realized through the operation of the business layer.
  
  1. What you are exposed to is that this web page belongs to the presentation layer, and this web page is generally implemented by combining HTML tags with CSS/JAVASCRIPT. At this time you have to fill in the data first.
  
  2. Then you press Submit to trigger the background processing mechanism, and then the data will be passed to the background code for processing. This part of the code can use PHP, JSP, JAVA, etc. according to different websites. After the code processes the received data according to the algorithm preset by the programmer, it will operate on the database and store the data accordingly.
  
  3. After successfully operating the database, the code of the business layer will send back an instruction to the presentation layer, which is the display, to inform you that the form is filled successfully.
  
 
  2. Front-end data interaction method
  
  1. HTML assignment
  2. JS assignment
  3. Script filling JSON
  4. AJAX to obtain JSON The
  first three data interaction methods are rarely used after the AJAX method of obtaining json is generally used. Today I mainly understand Click ajax to get json:
  Insert picture description here 
  
  The Ajax data interaction is the same as the concept we use the interface test tool, the request method is get/post, url address, and the parameters that need to be passed, and then the returned response value is processed.
  
** Bold style
**

After understanding the principles of Ajax and knowing the front-end and back-end data interaction methods, you can quickly locate the front-end or back-end errors during data transmission.

I recommend a software testing exchange group, QQ: 642830685. The group will share software testing resources, test interview questions, and test industry information from time to time. You can actively communicate technical issues in the group. In addition, there are technical experts . Guy answers technical questions for you.
Insert picture description here

Don't forget to give me a thumbs up after reading it. Your thumbs up is my inexhaustible motivation for continuous updating, refills.

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_53519100/article/details/112993455