What is a test case


A Test Case is a description of a Test task for a specific software product, reflecting the Test scheme, method, technology and strategy.

1. What are the equivalence classes of test methods: partition method, boundary value analysis method, error prediction method, causality diagram method, scene design method

2. Describe each test method (definition) with examples

Equivalence class partition method

Definition: Input valid equivalence class and invalid equivalence class data for testing. Valid equivalence class: refers to reasonable and meaningful data. For example: Test mobile phone number input box normal format Input invalid equivalence class: contrary to the definition of valid equivalence class. Refers to unreasonable or meaningless data. For a specific problem, there should be at least one invalid equivalence class, but there may be more. For example: Test the mobile phone number input box entered the wrong format (2.5.6, etc.)

Boundary value analysis

Boundary value analysis is a black box testing method to test the boundary value of input or output. In general, the boundary value analysis method is a supplement to the equivalence class partition method. In this case, the test cases come from the equivalence class boundary. For example, in the test mobile phone number input box, enter the mobile phone number of 10.11.12 digits, in which 11 digits are correct and 10.12 digits are the boundary value

Error conjecture

A method for designing test cases based on experience and intuition to predict all possible errors in the program. For example: test the back button, design use cases according to experience, test whether its function is available, and the physical back button after clicking the result is consistent, return interface is the requirements of the last web page and so on all possible errors

Causality diagram method

Is a graphical analysis of the input of various combinations, so as to design test cases, it is suitable for checking the program input conditions of various combinations. Example: Testing vending machines

Scene design method

Scenario 1. Successful withdrawals basic flow | | — – | — – | – scene 2. No cash basic flow | | is the ATM alternative flow 2 scene 3. Basic flow within the ATM cash shortage | | alternate flow 3 scenario 4. Wrong PIN code (and input opportunity) | | basic flow 4 scenario 5 alternative flows. PIN code is wrong, there will be no output opportunity) | | basic flow alternate flow 4 scenario 6. Wrong account no/account type basic flow | | alternate flow 5 7 scene. The account balance is insufficient basic flow | | alternate flow 6

3. Test cases of the login dialog box

Page Display Set Button Minimize Button Close button QQ Avatar Online Status Multi-Account Login Account Input box Account input box Right click Account input box Right click History box Password input box Open soft keyboard keypad secure Login Enter button Automatic login Remember password retrieve password Register account QR code different systems Remote Login Simultaneous login on multiple devices Associated Login Transfer files To each other Exit the client

4. Water cup test case

Function: Whether it can hold water performance: How much water can it hold how much hot water and ice water can it hold? Is it easy to deform? Is it insulated? Is the bottom design of the cup stable and not easy to tilt? How many cups can be stacked? The glass is smooth Porous/corrosion material is environmental protection material is inflammable long time storage will leak/broken compatibility: whether can be solid, and other liquid (sulfuric acid) ease of use: whether convenient easy to old children to use cup cup bottom size whether reasonable design whether convenient grip interface: Whether the paper surface is easily stained whether the interface picture is consistent with the requirements

5. Test cases of two-dimensional code

  1. Whether the TWO-DIMENSIONAL code can be recognized normally
  2. Check whether the login information is correct after scanning codes
  3. Discernible limit distance
  4. Whether it updates with each refresh
  5. Two-dimensional code clarity
  6. Time limitation of TWO-DIMENSIONAL code
  7. Use different devices to scan (IPDA, cross-platform, cross-system, front-facing camera)
  8. Use different apps to scan products
  9. Scan in the darkest, brightest light
  10. Keep the page size, shape, and color consistent with the UI
  11. Whether local scanning of two-dimensional code can be scanned
  12. Can multiple people scan at the same time
  13. Whether the invalid QR code can be recognized
  14. Whether there is a maximum number of scans
  15. Is there a prompt for scanning login requirements
  16. Scanning direction and Angle
  17. Whether the QR code of the screenshot or photo can be scanned normally
  18. Whether the qr code forwarded can be recognized
  19. Modify the QR code to check whether it can be used normally
  20. OCR scans multiple QR codes simultaneously

6. Coupon test cases

  1. Whether the coupon can be used normally
  2. Is the appearance consistent with the UI
  3. Whether some goods can be used normally
  4. Will you be prompted to use coupons when you buy something
  5. Whether coupons can be shared
  6. Whether it can be used normally after sharing
  7. Does the coupon have an expiration date
  8. Coupon time boundary value
  9. Whether special events will be postponed
  10. During the payment period, if the coupon is not paid for a long time, whether the coupon will be invalid
  11. Whether expired coupon can be used (will it self-destruct)
  12. Whether it can be given with the goods
  13. Whether coupons can be used across stores
  14. Whether the entry merchant coupon will automatically pop up
  15. Whether the coupon can be used in a superposition, maximum number of superposition
  16. Whether coupons from different stores can be used together
  17. Use the coupon button immediately to the product list
  18. Coupons can be stacked up to a few times
  19. Use the coupons together with the merchant’s full discount
  20. Can I use coupons for special items
  21. Will there be a warning about the expiration of the coupon
  22. Whether to deduct the corresponding amount after using the coupon
  23. Does not meet the conditions of the coupon can be used normally
  24. Whether different levels of users use the same coupon
  25. Whether a refund coupon is refunded after the purchase of an item using a coupon
  26. Use coupons to pay failed coupons are still there
  27. Whether the coupon will be refunded after the payment is cancelled
  28. Whether the coupon in the refund can be used again
  29. Whether the returned coupon can be used again
  30. Will it show that I used coupons in the order information
  31. When using coupons, disconnect the Internet coupon
  32. Whether it supports cross-platform, cross-system, cross-merchant, cross-application version

7. ATM test cases

Card: Whether it is our bank card whether it is a bank card (membership card, supermarket card) Whether it is a loss report card, demagnetization card, damaged card, lock card, frozen (debit card, debit card) Whether the bank card can display the balance properly does not operate when inserting the bank card, whether it will return the card or accept the card password: Six digits Correct password Incorrect password Length Test Whether the card will be locked if the password is incorrectly entered for three times Incorrect password Is entered for two times Incorrect password accumulation Whether the password is empty Verification Enter the old password verify the withdrawal:

  1. The ATM has insufficient balance
  2. Whether there will be counterfeit money when withdrawing money
  3. The execution time of the machine at the time of withdrawal
  4. Can the withdrawal amount be less than 100? The withdrawal amount is 0
  5. Is the amount of payment correct
  6. Whether the inter-bank deduction commission is correct
  7. The deduction balance is incorrect
  8. Can I take a decimal point
  9. Whether you can withdraw more money than the upper limit
  10. The maximum single withdrawal is allowed
  11. The withdrawal amount exceeds the card balance
  12. If you don’t take the money out, will you swallow the money
  13. Is there a maximum number of withdrawals
  14. If the balance is 0, withdraw money normally
  15. Prompt time of withdrawal amount

Print the receipt and return the card:

  1. Check whether vouchers can be printed normally
  2. Whether there is time prompt for printing vouchers
  3. Whether the contents of the receipt are correct
  4. Whether the card can be returned normally
  5. Whether the card will be swallowed if the card is not removed after the card is returned
  6. Check whether the card is successfully returned
  7. Whether will prompt please pick up card prompt
  8. Is there a delay in returning the card

8. Triangle test case

I. Judgment of input conditions

Input conditions for the three sides of a triangle:

  1. Integer 2. Three numbers 3. Positive number 4. Non-zero number 5. The sum of both sides is greater than the third side 6. Sides equal

2. Results based on output conditions

  1. Do not form a triangle Any one or more of conditions 1-5 are not met
  2. Conditions 1 to 5 are satisfied to form an ordinary triangle, but conditions 6 and 7 are not satisfied
  3. Conditions 1 to 5 are satisfied to form an isosceles triangle, and condition 6 is satisfied
  4. Conditions 1 through 5 are satisfied to form an equilateral triangle, and condition 7 is satisfied

Design test cases

Valid equivalence class Invalid equivalence class Integer non-positive Three numbers have only one or two numbers positive numbers have negative numbers Non-zero numbers have one side is zero the sum of both sides is greater than the sum of both sides is less than or equal to the sum of the third side both sides are equal three sides are equal

9. Test case for giving red packets

Input 200 quantity Increase quantity decrease data display page display input box Click character boundary value pop-up box display page jump Decimal point Reserve button display button Display Input password box display

Choose payment method

10. Add a shopping cart test case

  1. Is the page consistent with the required UI
  2. Can add to shopping cart normally
  3. If the account is not logged in, it can be added
  4. The account has been logged in and can be added
  5. Can items not in stock be added to shopping cart
  6. Maximum quantity of a single item
  7. The maximum number of items in a shopping cart
  8. Whether shopping cart can remove/add items properly
  9. Check whether the favorites list can be added normally
  10. Whether a favorite field is displayed when the cursor is placed over the favorite button in the shopping cart list
  11. Whether the quantity can be manually changed
  12. Is the number of shopping carts consistent with the number of shopping carts
  13. Jump of goods
  14. Whether there is a success prompt for adding items to shopping cart
  15. Add the expiration date of the item
  16. Whether the all button of shopping cart works properly
  17. Check whether the special offer shows the special offer name
  18. Whether the cursor is placed on the shopping cart to display the details of selected items
  19. Whether all goods in the same store will be settled
  20. Whether entering the shopping cart will be selected all by default
  21. Click all to check whether the amount statistics are correct
  22. Whether you can delete all items at once
  23. Whether coupons will be prompted at settlement
  24. Whether the jump of shopping cart button is normal
  25. Can the shopping cart display details
  26. Whether the pre-sale goods can be added to the shopping cart normally, whether the information is correct
  27. Whether goods of the same style and different sizes are displayed separately
  28. If the quantity of goods changes, is the amount correct
  29. Whether the shopping cart price changes in amount according to the price set by the merchant
  30. Whether the shopping cart will recommend similar products
  31. Different systems log in to the same account, whether the shopping cart information is consistent
  32. Click the settlement button to check whether it can jump normally
  33. Whether cart items are still displayed after settlement failure
  34. Whether shopping cart items support sharing
  35. Whether the shopping cart list is arranged according to the latest items

The display icon of the shopping cart button page is put on the shopping cart and the display box of the shopping cart content pops up and click the shopping cart button, After shopping cart button to jump to a shopping cart page to the number of shopping cart and settlement is consistent with the user’s choice of quantity My cart selection button Whether into the shopping cart for the default selection click if future generations can achieve selection or cancel all specials If you have selected to bargain, whether in the upper left corner showed a special logo. Display order of commodities (whether special commodities will be limited display) 2. Whether the display data of commodities are consistent with the commodities selected by users 3. Is there any difference between the price of one item and the total price of all items selected? 4. Can you delete the item in the shopping cart? Can I add or subtract the number of items in the shopping cart 6. Can I bookmark an item on the shopping cart page 7. Whether the selection box before the product can be selected 8. Whether the unit price of the product is consistent with the quantity and the total price of the single product 9. Whether you can jump to the product interface by clicking the picture or name of a product in the shopping cart 10. 11. Shopping cart whether special goods will be restored to the original price due to the expiration of the activity full selection button below full selection button whether the normal implementation of the function of commodity quantity, commodity amount, activity discount is consistent with the actual commodity total amount is consistent with the selected commodity amount to settle the button Whether clicking the “go to settlement” button can jump to the payment interface normally

11. Does your company cross-test? And what is cross-testing

We do cross-testing before we go live and cross-testing is to check modules against each other before we go live in order to prevent omissions and ensure product quality. (Usually in the third round)

12. How many tests did the project write

Depending on the size of the project, the big ones are thousands, the small ones are 800 or 800

13. How many bugs are found in the project, how many **** bugs are found in a day

A project of more than 100 can find 7-8 a day

14. How many test cases can be written in a day

50-60 is too few: we write test cases according to the process, one process one test case is quite many: we write more carefully. Use cases such as page fonts, colors, styles, etc.

15. How many test cases can be executed in a day

20-30 pieces (development quality)

16. How is the division of labor divided among the personnel of the company (tell the proportion of personnel allocation)

Generally, a project of about 20 people is tested by 2-3 people

17. How long is the iteration cycle and the time plan for the iteration

The first day: requirements review 2-3 days: test case writing and code development 4-5 days: test regression launch

18. What elements do test cases contain

Use case ID Module Function Expected Result Actual Result Remarks Test time of use case designer

19. What does your company use to write case

Written in Excel

20. On what basis do you write test cases

According to PRD, product model, etc.

21. Where are your test cases maintained (SVN orGit)

Difference 1: Git is distributed. SVN is not. This is the core difference between GIT and other non-distributed version control systems; Like SVN, GIT has its own centralized repository or server. However, GIT tends to be used in a distributed mode, where each developer clones his own repository on his own machine from the chectout code on the central repository/server. The main difference between GIT and other current version control systems is that GIT only cares about changes in the file data as a whole, whereas most other systems only care about specific changes in the file content. GIT does not keep data on these differences. In practice, GIT is more like taking snapshots of the changed files and recording them in a tiny file system. Each time an update is committed, the fingerprint information of all files is scanned and a snapshot is taken of the file, and an index pointing to that snapshot is saved. To improve performance, GIT doesn’t save the file again if it hasn’t changed, but only makes a link to the last saved snapshot. Difference 3: Almost all operations in GIT are performed locally. Most operations in GIT only require access to local files and resources. But with SVN, almost all operations require a network connection. Because GIT keeps historical updates of all local projects on your local disk, it can be very fast to process.

22. How many environments is the company divided into?

Pre-release environment: Release the version to be released in the pre-release environment and return to the production environment (online environment) : Release the version that has been returned to the pre-release environment in the production environment

23. You usually do several rounds of testing

Round three: Round one: Smoke test Round two: comprehensive coverage test of the system round three: regression test

24. Points to note when speaking of test cases

First of all, smoke, test the main functional process again, and then say a detailed test point, from top to bottom, from left to right

The Google Way of Software Testing. PDF

Blog Source: Blog of rainy Night