词条 | White-box testing |
释义 |
White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of testing software that tests internal structures or workings of an application, as opposed to its functionality (i.e. black-box testing). In white-box testing an internal perspective of the system, as well as programming skills, are used to design test cases. The tester chooses inputs to exercise paths through the code and determine the expected outputs. This is analogous to testing nodes in a circuit, e.g. in-circuit testing (ICT). White-box testing can be applied at the unit, integration and system levels of the software testing process. Although traditional testers tended to think of white-box testing as being done at the unit level, it is used for integration and system testing more frequently today. It can test paths within a unit, paths between units during integration, and between subsystems during a system–level test. Though this method of test design can uncover many errors or problems, it has the potential to miss unimplemented parts of the specification or missing requirements. White-box test design techniques include the following code coverage criteria:
OverviewWhite-box testing is a method of testing the application at the level of the source code. These test cases are derived through the use of the design techniques mentioned above: control flow testing, data flow testing, branch testing, path testing, statement coverage and decision coverage as well as modified condition/decision coverage. White-box testing is the use of these techniques as guidelines to create an error-free environment by examining any fragile code. These white-box testing techniques are the building blocks of white-box testing, whose essence is the careful testing of the application at the source code level to prevent any hidden errors later on.[1] These different techniques exercise every visible path of the source code to minimize errors and create an error-free environment. The whole point of white-box testing is the ability to know which line of the code is being executed and being able to identify what the correct output should be.[1] Levels
Basic procedureWhite-box testing's basic procedures require the tester to have an in-depth knowledge of the source code being tested. The programmer must have a deep understanding of the application to know what kinds of test cases to create so that every visible path is exercised for testing. Once the source code is understood then the source code can be analyzed for test cases to be created. The following are the three basic steps that white-box testing takes in order to create test cases:
AdvantagesWhite-box testing is one of the two biggest testing methodologies used today. It has several major advantages:
DisadvantagesAlthough white-box testing has great advantages, it is not perfect and contains some disadvantages:
Modern viewA more modern view is that the dichotomy between white-box testing and black-box testing has blurred and is becoming less relevant. Whereas "white-box" originally meant using the source code, and black-box meant using requirements, tests are now derived from many documents at various levels of abstraction. The real point is that tests are usually designed from an abstract structure such as the input space, a graph, or logical predicates, and the question is what level of abstraction we derive that abstract structure from.[6] That can be the source code, requirements, input space descriptions, or one of dozens of types of design models. Therefore, the "white-box / black-box" distinction is less important and the terms are less relevant.{{cn|date=October 2015}} HackingIn penetration testing, white-box testing refers to a methodology where a white hat hacker has full knowledge of the system being attacked. The goal of a white-box penetration test is to simulate a malicious insider who has knowledge of and possibly basic credentials for the target system. See also{{portal|Software Testing}}
References1. ^1 2 3 4 {{cite journal|last=Williams|first=Laurie|title=White-Box Testing|pages=60–61, 69|url=http://www.chaudhary.org/WhiteBox.pdf|accessdate=13 February 2013}}{{Verify source|date=February 2013}} 2. ^1 2 {{cite journal|last=Ehmer Khan|first=Mohd|title=Different Approaches to White Box Testing Technique for Finding Errors|journal=International Journal of Software Engineering and Its Applications|date=July 2011|volume=5|pages=1–6|url=http://www.sersc.org/journals/IJSEIA/vol5_no3_2011/1.pdf|accessdate=12 February 2013}} 3. ^1 2 3 4 {{cite journal|last=Ehmer Khan|first=Mohd|title=Different Forms of Software Testing Techniques for Finding Errors|journal=IJCSI International Journal of Computer Science Issues|date=May 2010|volume=7|issue=3|pages=12|url=http://ijcsi.org/papers/7-3-1-11-16.pdf|accessdate=12 February 2013}} 4. ^{{cite book |last=Binder |first=Bob |date=2000 |title=Testing Object-oriented Systems |publisher=Addison-Wesley Publishing Company Inc. }} 5. ^{{cite book |last=Myers |first=Glenford |authorlink=Glenford Myers |date=1979 |title=The Art of Software Testing |publisher=John Wiley and Sons }} 6. ^1 2 {{cite book |last1=Ammann |first1=Paul |last2=Offutt |first2=Jeff |authorlink2=Jeff Offutt |date=2008 |title=Introduction to Software Testing |publisher=Cambridge University Press |isbn=9780521880381 |url=http://cs.gmu.edu/~offutt/softwaretest/ }} External links
2 : Software testing|Hardware testing |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。