当前位置:网站首页>Technology sharing | system architecture under test and data flow analysis

Technology sharing | system architecture under test and data flow analysis

2022-06-09 18:50:00 51CTO

Technology sharing | Architecture and data flow analysis of the system under test

Deeply understand the architecture and data flow of the system under test during the test , Help understand business logic , Sort out business use cases and promote department collaboration . A deeper understanding of business logic means analyzing what the company does , What are the important business decisions of the company , How the data flow inside the company works , What are the common business scenarios . This can also test the degree of responsibility for the company's business , It can better serve the business department , Create value for the company .

Open source project litemall System architecture

The following is an open source project litemall For example , Analyze the system architecture of this project . litemall This product is a small Mall , With SpringBoot As the back-end ,Vue The administrator combines wechat applet as the front end ,Vue User as mobile terminal .

System architecture

litemall The system architecture is shown in the figure :

 Technology sharing | Architecture and data flow analysis of the system under test _ System architecture

Technology Architecture

litemall The technical architecture is shown in the figure :

 Technology sharing | Architecture and data flow analysis of the system under test _ System architecture _02

Open source project Mall System architecture

Mall The project is a set of e-commerce system , Including front office mall system and back office management system , be based on SpringBoot + MyBatis Realization , use Docker Containerized deployment . The front office mall system includes the home portal 、 recommendation 、 Commodity search 、 Merchandise display 、 The shopping cart 、 Order process 、 Membership Center 、 Customer service 、 Help center and other modules . Background management system includes commodity management 、 Order management 、 Member management 、 Promotion management 、 operation management 、 Content management 、 Statistical report 、 Financial management 、 Rights management 、 Setting and other modules .

System architecture

Mall The system architecture is shown in the figure :

 Technology sharing | Architecture and data flow analysis of the system under test _ data _03

Business structure

Mall The business architecture of is shown in the figure :

 Technology sharing | Architecture and data flow analysis of the system under test _ The business process _04

Company structure composition

adopt litemall and mall Two open source projects can be seen , In order to better serve the company , Need to understand the company's structure , General business structure and system structure .

Business structure

  • Business model : It is also the most concerned issue at present , How the company maximizes revenue . For example, how to make tiktok and how the fission system is involved. , This requires understanding the business model and technology stack of your business department , And the development mode and future trend of the company .
  • Business data : Understand the role 、 Resources and data . For example, the role in the company's account management center is administrator 、 The user etc. , These roles can be divided into those who output content and those who consume content , Except for the role , We also need to know the types of core resources and data information on the company's platform .
  • The business process : Understand roles in business data , The behavior of roles and the integration relationship between data .

System architecture

The system architecture is to implement the business architecture , Realize the business model and business process . 1. Architecture role and technology stack : The role of architecture will not change , The technology stack will change with the development of technology . Specific

  • gateway :Apache/Nginx/F5
  • application development :SpringBoot/SpringCloud
  • Communication protocol :Dubbo/HTTP/PB
  • Data processing :Hadoop/Spark/Flink
  • data storage :Redis/MySQL/Oracle/ES
  • Document storage :MongoDB/HBase/Neo4j

2. Deployment architecture : Integration relationship of architecture roles , Corresponding business process in business architecture .

Modeling language UML

For a quick understanding of the company's structure , You can use a unified modeling language UML To analyze the company structure . Common compiler language tools are :

  • plantuml( recommend )
  • yed
  • draw.io
  • processon
  • visio ( Not commonly used )

With plantuml Tools, for example , The following diagram model can be designed to analyze the company structure :

  • Use case diagram : Used to describe the business model 、 Business role
  • Sequence diagram : Used to describe business processes 、 Call relationship
  • Deployment diagram : Used to describe the system architecture and integration relationship
  • Activity diagrams : Used to analyze business logic

Use use case diagrams to sort out business processes

      
      
@startuml
left to right direction
actor User as user
actor Admin as admin
package goods {
usecase " Release commodities "
usecase " Browse products "
usecase " Purchase goods "
usecase " Take off the shelves "
}
package Order {
usecase " Settle orders "
usecase " Query order "
usecase " refund "
usecase " Manage orders "
}
admin -up-> Release commodities
admin -up-> Take off the shelves
admin -up-> Manage orders
user --> Browse products
user --> Purchase goods
user --> Settle orders
user --> Settle orders
user --> Query order
user --> refund
@enduml
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.

 Technology sharing | Architecture and data flow analysis of the system under test _ data _05

Use mind mapping to analyze function points

      
      
@startmindmap
scale 380 height
* <&flag>Debian
<strong> <&globe>Ubuntu
</strong>* Linux Mint
*<strong> Kubuntu
</strong>* Lubuntu
*<strong> KDE Neon
</strong> <&graph>LMDE
<strong> <&pulse>SolydXK
</strong> <&people>SteamOS
<strong> <&star>Raspbian with a very long name
</strong>* <s>Raspmbc</s> => OSMC
*** <s>Raspyfi</s> => Volumio
legend right
Short
legend
endlegend
@endmindmap
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.

 Technology sharing | Architecture and data flow analysis of the system under test _ The business process _06

Analyze data flow using sequence diagram

      
      
scale 300 height
user -> authentication center : Login operation
authentication center -> cache : Deposit (key=token+ip,value=token)token

user <- authentication center : Authentication returned successfully token
user -> authentication center : The next visit to the head carries token authentication
authentication center <- cache : key=token+ip obtain token
Other services <- authentication center : If it exists and the verification is successful, it will jump to other services requested by the user
Other services -> user : Information
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.

 Technology sharing | Architecture and data flow analysis of the system under test _ data _07

Use the test case analysis activity diagram

      
      
@startuml
scale 580 height
start
repeat
:Test something;
if (Something went wrong?) then (no)
#palegreen:OK;
break
endif
->NOK;
:Alert "Error with long text";
repeat while (Something went wrong with long text?) is (yes) not (no)
->//merged step//;
:Alert "Success";
stop
@enduml
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.

 Technology sharing | Architecture and data flow analysis of the system under test _ System architecture _08

The essence of sorting out business use cases is in the testing process , More comprehensive testing of the company's business . For example, complex e-commerce systems or management systems in the insurance industry , The business flow is very complex and involves a variety of internal users , Do not understand the business logic and data , It is difficult to write a well covered business use case . Better cross departmental collaboration with R & D, operation and maintenance refers to when the product has problems , R & D and operation and maintenance will be checked . As a test , To understand the problems and help R & D operation and maintenance to solve them , This can speed up the progress of departmental collaboration . ​​

原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206091834346470.html