-
What is black-box testing and white-box testing?
Any engineering product (any engineering product, mind you) can be tested using one of two methods.
Black-box testing: The functional design specifications of a product are known, and tests can be performed to prove that each implemented feature meets the requirements.
White-box testing: The inner workings of a product are known, and testing can be performed to prove that each internal operation meets the design specifications and that all internal components are inspected.
Black-box testing of software means that the test is done at the interface of the software. In this way, the test object is treated as a black box, and the tester does not consider the internal logical structure and internal characteristics of the program at all, and only checks whether the functions of the program conform to its functional description according to the requirements specification of the program. Therefore, black-box testing is also called functional testing or data-driven testing.
Black box testing is primarily designed to find the following types of errors:
1. Are there any incorrect or missing features?
2. On the interface, can the input be accepted correctly? Can you get the right results?
3. Is there a data structure error or an error in accessing external information (such as data files)?
4. Can the performance meet the requirements?
5. Are there any initialization or termination errors?
The white-box testing of the software is a detailed examination of the procedural details of the software. This approach treats the test object as an open box, which allows the tester to design or select test cases and test all the logical paths of the program using the logical structure and relevant information inside the program. Determine if the actual state is consistent with the expected state by checking the program status at different points.
For this reason, white-box testing is also known as structural testing or logic-driven testing. The white-box test is mainly to check the program module as follows:
1. Test all independent execution paths of the program module at least once.
2. For all logical judgments, the two cases of "true" and "false" can be tested at least once.
3. Execute the loop within the boundaries of the cycle and the boundaries of operation.
4. Test the validity of internal data structures, etc.
The above facts show that software testing has a fatal flaw, that is, the incomplete and incomplete testing. Since any program can only perform a small number of limited tests (relative to the huge number of exhaustive examples), it cannot be said that there are no errors in the program when no errors are found.
-
The black box only tests the function and exterior of the program under test for the relationship between input and output to see if it meets the functional description in the requirements analysis, regardless of its internal logic and internal characteristics.
White-box testing is a detailed examination of the internal process details of the system, and the program being tested is seen as a transparent box.
-
Commonly used black box testing.
The technical methods include dividing equivalence classes, boundary value analysis, false speculation, causal diagram, decision table composition method, and orthogonal experimental design.
Scenario method. Black-box testing, which is a test to check whether each feature works properly. In the test, the program is regarded as a black box that cannot be opened, and the test is carried out on the program interface without considering the internal structure and internal characteristics of the program, which only checks whether the program functions are used normally in accordance with the provisions of the requirements specification, and whether the program can properly receive the input data.
and produce the correct output information. Black-box testing focuses on the external structure of the program, regardless of the internal logical structure, and mainly focuses on the software interface and software functions.
-
The basis for classifying whether a software test is a white-box test or a black-box test is whether the source code of the system under test is tested.
In the actual project testing process, selecting and determining the test model is only the first step in our implementation of the test. In addition, we have to figure out what types of tests need to be carried out throughout the testing process, file the lines and perform the corresponding tests according to the different test types, so that our testing work can be carried out effectively. So how is software testing classified?
1. Divide software testing according to the project process stage.
It is a typical "V" model software development process, and the software testing work is carried out in a step-by-step process during the project development process. Here's what each stage of testing means. Unit Tests:
Unit testing is the process of testing a single subroutine or segment of a program with independent functionality.
2. White box test, black box test, gray box test.
White-box testing and black-box testing are mainly divided according to the visibility of software in software testing. This is also one of the most fundamental concepts in the field of software testing.
3. The different test surfaces of functional testing and performance testing software can be divided into functional testing and performance testing.
The functional shed stupid high test mainly checks whether the actual function meets the user's needs, so most of the test work is also carried out around the function of the software. Software is designed to meet the user's needs for its functionality, and any testing effort is meaningless if it deviates from this purpose.
Functional testing can be subdivided into many types: logical functional testing, interface testing, usability testing, chain rulers, installation testing, compatibility testing, etc.
-
The black-box testing methods include: equivalence class division method, boundary value analysis method, false guess method, causal diagram method, decision table-driven method, orthogonal experimental design method, scenario method, etc. The characteristics of each method are:
1. Equivalence class division method.
Equivalence class partitioning is to divide the input domain of the program into several parts (subsets), and then select a small number of representative data from each part as test cases. Representative data for each class is equivalent to the other values in this class for testing.
2. Boundary value analysis method.
Boundary value analysis is a test case by selecting an equivalence class boundary. The boundary value analysis method not only pays attention to the input condition boundary, but also must consider the output domain boundary. It complements the equivalence class partitioning method.
3. Wrong speculation.
Error guessing is a method of speculating on the possible errors in a program based on experience and intuition, so as to design test cases in a targeted manner.
4. Causal diagram method.
The cause-and-effect diagram method ultimately produces a decision table. It is suitable for checking various combinations of program input conditions.
5. Judgment table driven method.
The specific value of any combination of conditions and the corresponding action to be performed. A rule is a rule in the decision table where the column runs through the condition and action items. Obviously, there are as many rules as there are sets of conditional values listed in the judgment table, and there are columns for condition items and action items.
6. Orthogonal experimental design method.
It is a method of using the orthogonal ** that has been built to schedule experiments and perform data analysis in order to achieve the highest test coverage with the fewest test cases.
7. Scene method.
It can depict the situation when the event is triggered more vividly, which is beneficial for test designers to design test cases, and at the same time makes test cases easier to understand and execute.
-
Answer]: B software testing is program testing; The statement is incorrect. Software testing is more than just program testing, including use cases, units, integration, and validation, among others.
Software testing runs through the entire period of software definition and development, and different tests are carried out at different stages of development. Requirements analysis, requirements specification, design specification, and program are all test objects.
Black box testing, also known as functional testing, is a test that tests to see if each feature is working properly. The Black Wisdom Sakura box test focuses on the external structure of the program, regardless of the internal logical structure, and mainly tests the software interface and software functions.
Integration testing, also known as assembly testing or joint testing. On the basis of unit testing, all modules are assembled into subsystems or systems according to the design requirements (such as according to the structure diagram) for integration testing.
-
Black box testing: Black box testing refers to the process of testing without focusing on the internal processing logic of the program, and only focusing on the input and output.
If you input a test data and the output is correct, you think that the function is correct, also known as data-driven testing.
Case in point: a calculator app on your phone.
We enter 1+1= directly on our phone
If the output is 2 at this point, it proves that the operation is correct. In this process, we don't care about how the internal sock fibrillation program is calculated, as long as the result matches my input, it's OK. This test method is called the black box test.
Normally, our point-and-dot tests are also black-box tests.
-
White box test: also known as structural test or logic-driven test, it is to know the internal working process of the product, and can detect whether the internal action of the product is carried out normally in accordance with the provisions of the specification specification through the test.
Common methods for white-box testing.
Basic coverage criteria: logic driven, cyclic, base-circuit testing, etc., mainly used for software verification.
The "white box" method provides a comprehensive understanding of the program's internal logical structure and tests all logical paths.
The "white box" method is an exhaustive path test. When using this solution, the tester must examine the internal structure of the program, starting from the logic of the examination program and deriving the test data. The number of independent paths running through the program is astronomical.
But even if every path is tested, there can still be errors.
Black-box testing: also known as functional testing and data-driven testing, it treats the software under test as a black box that cannot be opened, and mainly designs test cases and tests them according to functional requirements.
Concept: Black-box testing is a type of testing that is implemented on software from outside the software, also known as functional testing or specification-based testing. The basic point is:
Any program can be seen as a mapping from the input definition domain to the output value domain, and this view sees the program under test as a black box that cannot be opened, and the content (implementation) inside the black box is completely unknown, only what the software is going to do. Because I can't see the contents of the box, I don't know how the software is implemented, and I don't care about the structure inside the black box, I only care about the input data and output results of the software.
Check whether the software function can work normally in accordance with the provisions of the requirements specification, and whether there is any function omission;
Detect whether there are human-computer interaction errors, whether there are data structure and external database access errors, whether the data can be properly received and the integrity of external information (such as databases or files) can be maintained;
Detect whether the behavior, performance and other characteristics meet the requirements, etc.; Detect errors in program initialization and termination, etc.
-
Software testing is literally easy to understand, software testing is to test the function and performance of the software, and know how to write test records, plan improvement plans, and check the overall performance of the software.
It mainly includes black box testing and white box testing.
The black box test is to test the function of the software, such as the camera software on the mobile phone, whether it can be opened normally after clicking.
White-box testing is relatively advanced, and it is your responsibility to check the overall performance of the software, whether the software can run smoothly, whether there are bugs, and find out these bugs and other defects.
The software is also divided into elementary, intermediate and advanced. The junior one is that you have to do what the leader tells you to do, and the intermediate one can guide others to do some work, but you also have to listen to the leader's command. Senior engineers are leaders themselves.
Software testing engineers don't need any foundation, and they are quick to get started and have a high salary. And because the overall performance of the software needs to be controlled, many senior engineers become the management of the company. Hope.
-
White-box testing needs more in-depth contact with **, such as the standardization and correctness of statements, etc., you can analyze the path by drawing a program flow chart, and after finding out the path, you can write test cases according to the path, while black-box testing does not need to be contacted, the main needs to design some test cases according to the function of the software, such as whether a button realizes its function, it may be more difficult to do a white box, and black-box testing is more common, of course, the treatment is relatively much higher than that of white box.
Black-box testing, also known as functional testing or data-driven testing, is the testing of a known product to determine whether each feature is valid. >>>More
Summary. The programmer industry is no different from other industries, experience is too important for this industry, and in the process of work, I often work overtime and stay up late to knock **. Everyone knows that staying up late is not good for girls, and there is no time for maintenance. >>>More
Extraction code: J3L1 Software Engineering is a discipline that studies the use of engineering methods to build and maintain effective, practical, and high-quality software. It involves programming languages, databases, software development tools, system platforms, standards, design parts such as email, embedded systems, human-machine interfaces, office suites, operating systems, compilers, databases, games, etc. >>>More
Software engineering is the study of engineering methods to build and maintain effective, practical, and high-quality software. It involves programming languages, databases, software development tools, system platforms, standards, design patterns, etc. Software engineering majors are required to take the following courses: >>>More
The scale of China's software industry is not very large, and some software companies only adopt some software engineering ideas in software production, and there is still a certain gap between them and large-scale industrial production. The reasons include the problems of management system, market problems, policy problems, and the incomplete and imperfect software engineering theory. Therefore, the research and application of software engineering, as well as the further development of China's software industry, require certain software engineering scientists and technicians who have both the theoretical foundation and research ability of software engineering and certain practical experience. The future of software engineering is bright. >>>More