当前位置:网站首页>Business process testing based on functional testing

Business process testing based on functional testing

2022-07-07 00:12:00 Mark community

Business process testing based on functional testing


Preface

Business process analysis methods are analyzed from different perspectives , There are six ways , Namely :
Structure oriented analysis 、 Process oriented analysis 、 Role oriented analysis 、 State oriented analysis 、 Scene oriented analysis and data oriented analysis .
Through the analysis and combined use of the above methods , It can clearly describe the business of the system , Make the business process coverage in the test process more comprehensive .


One 、 Structure oriented analysis

Definition

Structure oriented analysis is mainly aimed at the analysis of software system structure , According to the relationship between software systems , Get all subsystems in the system 、 The relationship between the functions of each block of the subsystem and the relationship between data transmission , Grasp the business relationship of the system as a whole . It is characterized by the architecture analysis between software systems
Analysis of the relationship between system function modules
Data structure is the data condition and result between systems


The example analysis

For example, the credit card system makes different transactions , It will produce different operations with various subsystems and external systems , Take the following two examples for analysis . Credit card transactions outside the bank , What to do , And how to consider the relationship between systems in the actual test ? Off bank transactions ——》 China UnionPay ——》 Longka system ——》 Credit card core system ——》 Bank card integrated business system ——》 General ledger system . In this operation , Except when the final result of the transaction outside the bank is handled correctly , In the actual test , Because the credit card core system also interacts with the general ledger system , To ensure balance , So after the transaction , The data of the credit card core system changes correctly , And the data of the general ledger system should also ensure the same changes , Maintain data consistency between systems . Credit card issuing : Credit card core system ——》 Business card printing / Card issuing system Customer information is recorded by the credit card core system , Send customer information to business card printing / Card issuing system , Generate credit card account number and card number .

Two 、 Process oriented analysis

Definition

Process oriented analysis is mainly used to analyze system business , Clearly analyze the steps of normal operation in the process of business flow , And the scenes generated in each step , These scenarios form the business test cases in the test process .


Process oriented analysis process and steps

1. First, determine the step division of the business process , That is, what are the core steps of the whole business process , And label .
2. Determine the main event flow of the business operation process , That is, the business can be operated normally .
3. Identify alternative event flows for business operations , That is, this business process is in the process of circulation , Other business processes due to changes in conditions .
4. According to the results of the main event flow and the alternative event flow , Construct the scene , And form a scene table .
5. Form test cases of business processes , Each scenario is a case .


Description of main event flow and alternative event flow

1. Main event flow
1) Each step needs to be numbered to clearly indicate the sequence of steps .
2) Use a short title to summarize the main content of each step , Then describe in detail the interaction between the participants and the system for each step . Each step needs to be described from both positive and negative aspects :
− What information did the participant submit to the system ;
− What is the response to this system .
3) stay When describing the information exchange between participants and the system , Need to point out the specific information back to deliver . for example , It's not clear that participants only input customer information , It's best to be clear that the participant entered the customer's name and address .
4) The active voice should be used when describing the main event flow , Don't be passive .
2. Alternative event flows
When describing alternative event flows , It should include the following elements :
1) The starting point : Which step of the event flow does the alternative event flow start from ;
2) Conditions : Under what conditions will this alternative event flow be triggered ;
3) action : What actions will the system take under this alternative event flow ;
4) recovery : After the alternative event flow ends , The Use Case How to proceed .
The description format of the alternative event flow can be consistent with that of the basic event flow , It also needs to be numbered and summarized with a title , The number can be prefixed with letters A(Alternative) To show the difference from the basic event flow steps


The example analysis

Pay the mobile phone fee in the online banking system , How to analyze .
1. The process steps of the business process are determined
1) Select the payment function , Pay for your cell phone ;
2) Enter mobile phone number information , Submit mobile system certification
3) Mobile system certification passed , Display payable information ;
4) Select a payment account , Submit
5) Confirm the password , Enter the password to submit
6) Online banking will transfer the mobile phone fee from the bank account to the mobile system account , And submit a transfer request to the banking system
7) After the bank core system authentication passes the account dynamic password , Transfer the money from the transferor's account to a On the account of the transferee , And notify the online banking system of the successful transfer
8) After online banking learned that the transfer was successful in the banking system , Inform the mobile billing system to recharge the customer's mobile phone number
9) After learning that the mobile billing system has successfully recharged the customer's mobile phone number , Notify the customer that the payment is successful
10) The customer inquires through the payment records , Further confirm the success of the transaction
From the above mobile payment operation process , If you can't make it clear about the payment process , Then some functions will be missed .
2. Main event flow
1) On the homepage of online banking system , The customer selects the payment in the payment function area to activate this use case .
2) Enter mobile phone number information
− The customer chooses the region where the charging unit is located : The Beijing municipal
− The customer selects the payment item category : Communication services
− The customer chooses the charging unit : Beijing mobile phone fee
− The customer chooses the payment content : Beijing mobile mobile agent payment
− The customer enters the mobile number :1360*******
The customer clicks next , Online banking submits the cash register number to the mobile system for authentication
3) After the mobile system is certified , return “ Please enter payment information ” page , Display the payable amount
4) stay “ Please enter payment information ” page , The customer chooses a billing account :62270000147100860**, Click next , Get into “ Please confirm the payment information ” page
5) The customer enters the dynamic password :423597
6) Online banking will pay the amount , transferor ( Customer accounts ) And the account of the transferee ( Mobile Corporation ) Information , The transfer request message is constructed and submitted to the bank core system
7) After the bank core system authentication passes the account dynamic password , Transfer the money from the transferor's account to a On the account of the transferee , And notify the online banking system of the successful transfer
8) After online banking learned that the transfer was successful in the banking system , Inform the mobile billing system to recharge the customer's mobile phone number
9) After learning that the mobile billing system has successfully recharged the customer's mobile phone number , Notify the customer that the payment is successful
10) The customer inquires through the payment records , Further confirm the success of the transaction
11) Customers exit the payment function area , End of use case
3. Analysis of alternative event flows
Alternative event flows a.1
The mobile number is incorrect In the main event flow step 2- Enter the mobile number , If the entered mobile phone number is incorrect , The system will prompt “ Illegal cell phone number ”, After the customer clicks ok , Return to the main event flow step 2, Re enter the mobile number .
Alternative event flows a.2
The account status is incorrect In the main event flow step 6- Bank certification , If the account status is incorrect , If reporting the loss 、 The state of being unable to withdraw money, such as freezing , The system will prompt the account status error message . After customer confirmation , Return to the main event flow step 4, Reselect the account
Alternative event flows a.3
There is not enough cash in the account In the main event flow step 6- In the process of bank deduction , If the amount in the customer account is less than in the main event flow step 3 The payment amount returned by China Mobile , The system will display the corresponding message , After customer confirmation , Return to the main event flow step 4, Reselect the account
Alternative event flows a.4
Exceed daily maximum In the main event flow step 6- In the process of bank deduction , If the banking system returns an error code indicating that the amount the customer wants to withdraw has exceeded 24 The maximum amount allowed in an hour , The system will display the corresponding message , After customer confirmation , Return to the main event flow step 4, Reselect the account
Alternative event flows a.5
User cancelled The user is at any step of the main event flow , You can click the Cancel button or close the web page , Interrupt the payment operation ,Use Case end of execution
Alternative event flows a.6
No recharge success message was received In the main event flow step 9- If the online banking system does not receive the message of successful recharge of the mobile billing system , The amount deducted from the customer's account will be returned to the customer ,Use Case end
Alternative event flows a.7
Payment password input error In the main event flow step 5- Enter the dynamic password section , If the customer enters the dynamic password incorrectly , Online banking will prompt the customer to re-enter , If you input wrong more than three times , Then this Use Case end
4. Construct the scene
Number Scene name
1 Normal payment Main event flow
2 Illegal cell phone number Main event flow Alternative streams 1 Main event flow
3 The account status is incorrect Main event flow Alternative streams 2 Main event flow
4 The account is short of cash Main event flow Alternative streams 3 Main event flow
5 Exceed the withdrawal limit Main event flow Alternative streams 4 Main event flow
6 Cancel operation Main event flow Alternative streams 5 Main event flow
7 Recharge failed Main event flow Alternative streams 6 Main event flow
8 The payment password is wrong 1 Time Main event flow Alternative streams 7 Main event flow
9 The payment password is wrong 2 Time Main event flow Alternative streams 7 Alternative streams 7 Main event flow
5. Generate cases
According to the scene diagram above , Finally, this business flow is 9 Test cases ,1 Business examples ,8 A counter example of business .


3、 ... and 、 Role oriented analysis

Definition

Role oriented analysis is when doing business requirements analysis , Divide the functional operations in the system according to roles and role permissions , When executing business processes , Perform corresponding business operations according to role permissions .


Test considerations

1. During the test, whether the operation of each role in the system meets the permissions of the role .
2. Whether the operation of the role in the system exceeds the operation permission of the role .


How to analyze the roles in the system

1. What roles are there in the system ?
2. What can each character do ?
3. Which positions are corresponding to each role ?
4. Whether the functions to be realized by these roles have been realized ?
5. Have all permissions in the system been analyzed ?


The example analysis ( Take a process as an example )

For a company using OA How does the system perform role analysis ?
1. First determine which roles : System administrator 、 Ordinary users 、 Department leaders 、 The general manager
2. Who does each role include ?
System administrator : Usually assigned to one person
Ordinary users : Ordinary employees of the company
Department leaders : Leaders of all departments in the company
The general manager : The top leader of the company
3. What can each role do ?
System administrator : Maintenance management company OA The platform also divides the roles and assigns permissions to all personnel of the company .
Ordinary users : Can receive mail , See the notice and other operations within the permission .
Department leaders : Management of employees in the Department , For example, the approval of asking for leave
The general manager : With maximum privileges , It can be done to OA All functions in the platform have query and approval authority .
2. Business process and role are combined to analyze a business process .
1. Identify roles : Drafting department 、 Drafting department leader 、 Office staff , Office leader
2. Determine the person corresponding to the role
Draft role : Personnel from various departments of government agencies
Draft and check : Leaders of government departments
Office staff : All staff in the office
Office leader : Director of General Office
3. The permissions of each role in the whole document sending process
Draft role : Draft the document , And send it to the department leader for review .
Draft and review role : Do you check the draft of the Department
Office staff : Office review 、 Legality review 、 Document registration 、 print 、 proofreading 、 Sealing and sending to archiving Department .
Office leader : Issue
4. After determining the relationship between roles and processes , Draw a flow chart by role , Clearly see the permissions of roles in the process at a glance .
Here's the picture :
 Insert picture description here


Four 、 State oriented analysis

Definition

1. state : It refers to a discrete condition or condition in the life cycle of an object , In the meantime, the object will satisfy certain conditions , Perform certain activities or wait for certain events .
2. event : It refers to occupying a certain position in events and space , meaningful , Description of things that can trigger state transition
3. transformation : A transition is a relationship between two states , It indicates that the object performs certain actions in the first state , And enter the second state when specific things happen or specific conditions are met .
4. Activities : It is the non atomic execution during the state
5. action : It is the one that causes the change of model state or the return of value , Atomic operations can be performed


Pay mobile phone fee status chart

 Insert picture description here


Generate status event table

Enter your phone number Mobile phone number authentication Construct transfer application The bank performs the transfer Cellular phone replenishing The Bank revokes the transfer
Submit mobile number Mobile phone number authentication • • • • •
The mobile phone number is invalid • Enter your phone number • • • •
Customer cancels end • end • • •
Customer submits account information • • The bank performs the transfer • • •
The account balance is insufficient • • • Construct transfer application • •
Exceed the payment limit • • • Construct transfer application • •
The dynamic password of the customer is entered incorrectly • • • Construct transfer application / end • •
Form test cases


State diagram analysis of mobile phone payment , Generate event status table

In the flow chart above , Each node is considered a state in the business process , Entering a certain state requires different conditions ( event ) To trigger , To achieve the transformation of state .

The difference between state diagram and flow diagram

Control flow charts generally describe a single process , That is, only one condition is satisfied at each node to carry out the flow of the process . The above figure is transformed into a flow chart as follows :
 Insert picture description here


5、 ... and 、 Data oriented analysis

Definition

Data oriented analysis is mainly the result of input data in the process of business analysis , Analyze the consistency and accuracy of data .( How data flow is transformed and the correlation between data )

The example analysis

In the above analysis , Through different input data , constructed 7 Test cases , In the actual test , According to the above analysis, determine the input value for each input item , as follows :
Number Phone number One-time password The password is wrong three times Account status The account balance Payment limit Expected results
1 V V I V V V Payment succeeded
2 I NA NA NA NA NA Report the wrong mobile number
3 V I I NA NA NA Report dynamic password error
4 V I V NA NA NA Cancel payment
5 V V NA I NA NA Prompt that the account status is incorrect
6 V V NA V NA NA Prompt insufficient account balance
7 V V NA V V I Prompt that the payment limit is exceeded
Number Phone number
( Assume that the fee payable 320) One-time password The password is wrong three times Account status The account balance Cumulative payment – Payment limit Expected results
1 13810034560 12345 I normal 500 500 Payment succeeded
2 13810034666 NA NA NA NA NA Report the wrong mobile number
3 13810034560 12567 I NA NA NA Report dynamic password error
4 13810034560 12567 V NA NA NA Cancel payment
5 13810034560 12345 NA frozen NA NA Prompt that the account status is incorrect
6 13810034560 12345 NA frozen 200 NA Prompt insufficient account balance
7 13810034560 12345 NA frozen 500 -20 Prompt that the payment limit is exceeded

原网站

版权声明
本文为[Mark community]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131017387042.html