Testing- "Software Test" Reading Notes (3)

xiaoxiao2021-03-06  92

Dynamic black box testing software testing methods that do not go deep into code details. It is often called behavioral test because the test is the actual behavior of software during use. First, obtain the input of the software of the test object and the output that should be obtained from the product manual. Next, the test case is started. Test case: Refers to the input of the experiment, and the program for testing the software. Selecting a test case is the most important task of software testers. Incorrect choices may cause the test amount to be too large or too small, and even the test target is wrong. Accurately evaluate risks and reduce the possible possible properties to the scope of control. Test Basic Method: Test the test VS failed test: Confirm that the software can do at least, and do not test its capabilities. Failure test: Test cases designed and executed purely to destroy software, also known as forced events. The weak link of the software is deliberate. When designing and executing a test case, it is always tested first. It is important to see if the software basic function is implemented before the destructive test, otherwise it will weird why there are so many software defects when using software normally. A common test case is to try to force the software to have an error message. The product manual may give such a functional requirements, and the testing of this problem may be a failure test. Maybe both. Don't deliberately distinguish, it is important to find software defects! Choose a test case: Equivalent assignment is equivalent to assignment: It is a score step to reduce excessive (unlimited) test cases to the same effective small range. Also known as equivalent division. The equivalent allocation technology provides a system approach to which values ​​that choose to discard it. The equivalent category or equivalent interval refers to a set of test cases that test the same goal or expose the same software defect. When looking for an equivalent interval, I want to simply input the software, output, and operate into groups. These groups are equivalent intervals. The purpose of equivalent assignment is to reduce possible test case combinations to still test software. Because it is not fully tested, it is necessary to take a certain risk. If the amount of test case is excessively equivalently distributed in order to reduce the number of test cases, the risk of testing will increase. In addition, the division of the equivalent interval has not a certain standard, as long as it is enough to cover the test object. Data test software consists of two most basic elements of data (including keyboard input, mouse click, disk file, printout, etc.) and program (executable processes, conversion, logic, and operation). Software testing data is to check the information input by the user, return the result and the intermediate calculation result is correct. Mainly equivalent allocation is carried out in accordance with the following principles to reasonably reduce test cases: boundary conditions, suborder conditions and invalid data. 1. Boundary condition Test procedures are pairs when handling a large number of intermediate values, but errors may occur at the boundary. For example, the processing of [0] elements of the array. To define an array of 10 elements in BASIC, if you use Dim Data (10) AS Integer, it is defined as an array of 11 elements, and use for i = 1 to 10 when rating. To assign values, it will generate permissions because the program has forgotten the processing of I = 0 elements. Boundary conditions refer to the edge conditions where the software plan is located. Data Type: Numerical, Character, Location, Quantity, Speed, Address, Size, and the like, will contain a determined boundary. Characteristics should be considered: the first / last, start / complete, empty / full, slowest / fastest, adjacent / farthest, minimum / maximum, more than / within, shortest / longest, earlier / The most late, up to / lowest. These are all possible boundary conditions.

Select the data contained in the equivalent allocation based on the boundary. However, only the data points on the boundary line are often not sufficient. When border conditions are proposed, it is necessary to test legitimate data from the adjacent boundary, that is, test the last possible legitimate data, as well as illegal data just exceeded. The following example shows how to consider all possible boundaries: If the text input field allows you to enter 1-255 characters.

Try: Enter 1 characters and 255 characters (legitimate intervals), or add 254 characters as legitimate tests.

Enter 0 characters and 256 characters as the illegal interval.

If the program reads and writes floppy disk

Try: Save a size of a size and even one item.

Then save a very large-file that is just within the floppy disk capacity limit.

Save empty files.

Save the size of the file that is greater than the floppy disk.

If the program allows multiple pages on a piece of paper

Try: only print one page

Print permissible maximum page

Print 0 pages

More than the allowed page (if possible)

2. Subcommittees

The above is a common boundary condition, which is defined in the product manual, or determined during software. However, some borders are inside the software, and end users can almost see, but software tests still need to be checked, such boundary conditions become secondary boundary conditions or internal boundary conditions. Find such boundary conditions, do not require software testers to become programmers or have the ability to read source code, but they do require substantially understanding of software. 2 The multiplication and ASCII table is two examples:

Passenger

Terminology range or value bit Bit 0 or 1 dual DoubleBit 0 ~ 15 bytes byte 0 ~ 255 word Word 0 ~ 65, 535 or 0 ~ 4, 294, 967, 295 thousand k 1,024 megabits M 1,048,576 billion 1,073,741,824 trillion 1,099,511,627,776

The basis of computer and software is the number of binary. Therefore, the two multipliers are important data as boundary conditions. For example, in communication software, the ability of bandwidth or transmission information is always limited, so the software engineer will do every effort to compress more data in the communication string. One of the methods is to compress information into small units as small as possible, transmitting the most common information in these small cells, and expands to large units when necessary. Suppose some kind of communication protocol supports 256 commands. The software will send the most commonly used 15 commands encoded as a dual bit; if the commands between the 16th to 256, the software is turned to send a command encoded as a longer byte. In this way, the software will perform specialized calculations and different operations based on the dual / byte boundary.

When establishing an equivalent interval,

Consider whether or not the multiplier boundary condition containing 2 is required. For example, software accepts numbers in the range of 1 to 1000, then in addition to 1 and 1000, there may be 2 and 999, and should have nearly 2 multiplication: 14, 15, 16 and 254, 255 and 256.

ASCII table

The ASCII chiometer is not a good structure. Number 0 ~ 9 corresponds to 48 ~ 57; slash characters (/) at 0, colon (:) behind 9; uppercase letters A to Z correspond to 65 ~ 90; lowercase letters correspond to 97 to 122. These conditions represent the secondary boundary conditions. If you test text input or text conversion software, refine the ASCII table is quite wise when defining the data interval contains. For example, the text box that tests only accepts user input characters A ~ Z and A ~ Z, and should include the value before and after these characters in the ASCII table in the illegal interval - @, ', [, {. 3. Default Test (default, blank, null, zero value and none)

Good software handles this situation, common method: First, the input content defaults to the minimum value within the legal boundary, or a reasonable value in the legal interval; the other is to return the error message. These values ​​are usually required in software. Therefore, a separate equivalent interval should be established. In this default, if the user input 0 or -1 is used as illegal values, different software processing processes can be performed.

4. Destructuring the test (illegal, error, incorrect, and junk data) Data Tests This type is the object of failure test. Such tests have no practical rules, just try to destroy the software. Do not act according to the requirements of the software, play creativity!

Status Test Status Test is a logic process of different status verification programs. Software testers must test the status of the software and their conversion. The software status refers to the current situation or mode of the software. The software enters a process branch through the code, triggers some data bits, set certain variables, read certain variables, to transfer a new state. Like data testing, status test uses equivalent allocation techniques to select status and branches. Because it is not fully tested, it is necessary to bear a certain risk, but by reasonable choice to reduce the danger. 1. Establish state transition diagram Use: box and arrow; circle (bubble) and arrows. Projects should be included: - each independent state that software may enter. If it is not concluded whether it is independent, it is considered to be; in the future, it is found to be excluded. - Transfer from one state to the inputs and conditions required for another state. The cause of state changes and existence is the object we are looking for. - Setting or exit setting conditions and output results when you enter a certain state. Includes the displayed menu and button, the set flag bit, the resulting print output, the execution operation, etc. Since it is a black box test, it is only necessary to establish a state map from the perspective of the user. 2. Reduce the status of the status and conversion to test the combination of each route, and all branches are impossible. A large amount of possibilities also require a reduction in test case collections that can be operated. The method has the following five types: - Access at least once per state. No matter what method is used, each state must be tested. - Test It looks the most common state transition - the least common branch between test states. These branches are most vulnerable to product designers and programmers. - Test all incorrect state machines return value. Whether the error gets the correct processing, the error message is correct, and if the error is fixed, it is correctly recovered correctly - the random state conversion. 3. Specific Test - Define Test Case Test Status and Its Conversion Includes All Static Conditions, Information, Value, Functions, and so on with the entry and exit status. Such as: Window appearance, window size definition (fixed / last use of size), displayed menu, default set value, name of the document, etc. Status must be determined by the statement. State variables may not be visible, but it is important, a common example of the documentation logo (whether it is queried when it is determined). The case of failure test of the failed state test status test is mainly competitive conditions, repetition, oppression and weight. 1. The multitasking operating system is not difficult to design the multitasking operating system, and the design that makes full use of multitasking capabilities is a daunting task. In the real multitasking environment, software design is definitely not to be of course, and must be processed to be interrupted at any time, can run simultaneously with any other software in the system, and share memory, disk, communication devices, and other hardware resources. Such a result is the problem of competition conditions; the software is unpredictable, and the timing will be disorderly. Competitive condition test is difficult to design, it is best to first look at each state in the status conversion graph to find out which external impact will interrupt.

转载请注明原文地址:https://www.9cbs.com/read-106418.html

New Post(0)