Traditional Culture Encyclopedia - Traditional culture - Test cases and methods of software testing
Test cases and methods of software testing
Use case definition: a set of use cases consisting of test input, execution conditions and expected results for a business.
Why study test cases?
1: We can avoid the problem of blind testing by making use cases before testing, which can greatly save our testing time.
2. When testing, if you use examples, just avoid the important and test the important first.
3. Only a few test cases need to be modified after the software is updated, which reduces the work intensity and shortens the project cycle.
4. Check whether the software meets the needs of customers, reflect the workload of a tester, and show the design ideas of test cases.
Core elements of test cases (16)
Must master: use case number (how to name it), module, use case title, priority, preconditions, operation steps, test data, expected results and actual results.
Understand the content: pass or fail, bugID, writer, writing time, tester, testing time, remarks.
1: use case number: product model-file type-version number-serial number (Taobao Mall: TB-TC-11-001)
2. The module:
3. Use case title: Generally, you can guess what this use case is testing by looking at the title.
4: Priority:
5. Prerequisite: What must be done before doing this test.
6: Operation steps:
7. Test data:
8. Expected result: Once the preconditions/operation steps/test data are given, we will know the expected result, which is the correct result (expected result).
9. Actual effect (special attention): You won't know until you actually test it. Don't write when writing use cases, write after testing.
10: Pass No: see if the actual result is consistent with the expectation, and if it is consistent, no bug will pass; ; Inconsistency, failure, error
11:bugid: the number of the bug.
12: Author:
13: writing time:
14: Testers: Who tests and writes.
15: test time:
16: Remarks:
Extracting test points
One place needs analysis and testing.
A test point can have multiple test cases, and a test case has only one test point.
Every place where users interact is a test point.
What is a high-quality test case?
1: The test case covers all user requirements.
2. Test cases should be simple and clear.
3. All types of test cases should be complete.
4. Cover the most requirements with the least use cases.
Methods of testing cases
Equivalence class division method:
It is to distinguish the possible input data in an area, and then take out representative data from the area for testing.
Equivalence class: What is equivalence class? A set of input fields in which each input condition is equivalent.
Classification:
Generally divided into valid equivalence classes and invalid equivalence classes:
Effective equivalence class: that is, meet the requirements and input a reasonable data set;
Invalid equivalence class: it just doesn't meet the requirements and the input data set is unreasonable;
type
Range type: enter the student's grade 0- 100.
Equal type: only one result is correct, others are wrong, such as the lottery prize.
Boolean value: To choose by agreeing or not, such as agreeing to an agreement.
Enumeration type: given the content of options, as long as any one of them is satisfied, you can choose education, such as.
Rule type: given the demand, those that meet the demand can be used, such as mailbox.
Character types that can be filled in any text input box: Chinese, English, special symbols, spaces, numbers.
Boundary value analysis
Determination of boundary value: boundary value analysis is to test some data slightly above and below the boundary.
Methods for determining boundary values: upper point, lower point and inner point.
1: Upper point: The upper point refers to the point on the boundary. If the interval is open, the upper point is outside the definition domain; if the interval is closed, the upper point is within the definition domain, and the upper point follows the outer closure.
2. Starting point: the point closest to the upper point. The starting point of open interval is in the domain, and the starting point of closed interval is outside the domain. The starting point follows the principle of combining the inside with the outside.
3. Interior point: the value in the middle of the field is 1.
Example:
0<= x<= 10 upper left point 0 lower left point-1 lower right point 1 1 0 inner point 5.
0<x< 10 upper left point 0 lower left point 1? Right starting point 9? Upper right point 10 inner point 5
0 & lt= x & lt 10? Top left point 0 left starting point-1 right starting point 9? Upper right point 10 inner point 5
Close [0, 10], open point 0 and upper right point 1 1.
- Related articles
- How to write the letter format?
- Does the traditional toilet have a liner?
- What are the specialties of Shandong Spring Festival?
- How to open a barbecue shop?
- How to catch hanging fish?
- The Significance of Square Culture
- Classification of kindergarten games
- How many bullets can a revolver usually hold?
- Advantages and disadvantages of gold sandblasting process
- How to write a summary of secretarial work