Software testing classic interview questions: How to test the payment function?

In the era of non-cash payment, non-cash payment has become an indispensable part of life. We only need a mobile phone to travel all over the country (the premise is Alipay, WeChat is rich <00>), so as a tester, pay the test It is also a very important part, so let me combine some problems encountered in my work and summarize the common payment tests:

One: Payment classification:

First of all, according to different dimensions, we can usually divide payments into types as shown in the figure below:
insert image description here

Secondly, generally speaking, online payment is divided into two consumption modes. One is to pay the amount directly, such as Taobao, Jingdong and other shopping websites, or membership services such as 360 cloud disk, video membership, etc.; Consumption, such as game platforms, pepper and other products!

Two: functional testing

The next step is the testing work. The first thing to do is functional testing. Then I combined various testing methods such as boundary value, class division, error guessing, and causality diagram to sort out a relatively comprehensive set of test cases. The payment function is tested to ensure that the entire payment process and the payment processes involved are usable under all circumstances.

Three: interface test

Clarify the interface that needs to be called in the entire payment process, distinguish the interface of the merchant and the third-party platform and the request method of parameters, including the encryption of specific parameters of the interface, the use of abnormal order numbers to simulate payment, the inspection of the server, etc.

Four: Security testing

The payment will involve the amount, so we need to consider the aspect of security testing, forgery of payment requests, malicious tampering of the amount, malicious simulation of third-party interfaces to call merchant interfaces, etc., are all issues that we need to consider clearly

Five: Payment process

As shown below
insert image description here

Six: Test point

Payment Process Test Point

1. Whether the payment amount is consistent with the payable amount (for example: whether the scanned payment QR code is consistent with the displayed payable amount). Payment still needs to go through the entire payment process. From confirming the order to the final successful payment, there may be problems in any step.

2. The same payment method, but different payment portals (for example, as shown in the figure below, Alipay has two payment portals. You can pay by scanning the QR code or paying through the Alipay webpage. During the test, the two portals must be covered.

3. After the payment is successful, whether the product purchase is successful

(For example, membership service products, whether the membership expiration time is normally delayed after purchase; such as purchasing goods, after successful payment, whether the order status has changed, whether the product type and quantity are correct, etc.)

4. After the payment is successful, is the user's amount deducted successfully?

Payment amount test point
1. Normal amount payment
2. Minimum value of amount: 0.01
3. Meaningless value: 0 yuan
4. Maximum amount: set the maximum amount of payment

5. Bank card or WeChat, etc., set the maximum daily consumption amount or single maximum consumption amount 6. Pay when the bank card or WeChat balance is insufficient

Payment process test point
1. Complete the payment process normally
2. Cancel the order after calling the order
3. Continue to pay after the payment is interrupted
4. End the payment after the payment is interrupted
5. Single payment for a single order

6. Multi-order combined payment 7. Continuous click payment, whether there will be multiple purchases

Payment method test point
1. Alipay payment
2. Alipay web payment
3. WeChat payment
4. Bank card payment
Coupons or discounts (there are certain discounts)
are used in the payment of coupons/discounts, whether the payable amount and the actual payment amount are correct or
not /Whether the discount is mandatory or not, can the coupon/discount still be used after the refund of the payment order is completed?

Pit 1: The payable amount displayed on the page is returned through the interface vip.product, and the payable amount is displayed on the front end. However, the payment QR code is returned through the interface vip.getPayUrl. As a result, the value scanned by the QR code is different from the displayed payable amount! ! ! The final problem is that vip.getPayUrl takes the server cache, which causes the amount displayed by the QR code to be inconsistent with the payable amount displayed on the front end. Therefore, the test payment still needs to go through the entire payment process. From confirming the order to the final successful payment, there may be problems in any step.

Pit 2: Pay through the Alipay website. After the payment is successful, the page does not jump back to the original service package page. The final reason is that the return_url of the service configuration is incorrect, resulting in the failure to return to the original page after payment. If the test case does not cover this scenario, it will cause very serious online accidents


              [The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled]


1. From entry to mastery of Python programming

2. Interface automation project actual combat 

3. Actual Combat of Web Automation Project


4. Actual Combat of App Automation Project 

5. Resume of first-tier manufacturers


6. Test and develop DevOps system 

7. Commonly used automated testing tools

Eight, JMeter performance test 

9. Summary (little surprise at the end)

life is long so add oil. Every effort will not be let down, as long as you persevere, there will be rewards in the end. Cherish your time and pursue your dreams. Don't forget the original intention, forge ahead. Your future is in your hands!

Life is short, time is precious, we cannot predict what will happen in the future, but we can grasp the present moment. Cherish every day and work hard to make yourself stronger and better. Firm belief, persistent pursuit, success will eventually belong to you!

Only by constantly challenging yourself can you constantly surpass yourself. Persist in pursuing your dreams and move forward bravely, and you will find that the process of struggle is so beautiful and worthwhile. Believe in yourself, you can do it! 

  

Guess you like

Origin blog.csdn.net/nhb687095/article/details/132147419