White-box testing

Black box systems
System
Black box, Oracle machine
Methods and techniques
Black-box testing, Blackboxing
Related techniques
Feed forward, Obfuscation, Pattern recognition, White box, White-box testing, Gray-box testing, System identification
Fundamentals
A priori information, Control systems, Open systems, Operations research, Thermodynamic systems

White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of software testing 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 is 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. Where white-box testing is design-driven,[1] that is, driven exclusively by agreed specifications of how each component of software is required to behave (as in DO-178C and ISO 26262 processes), white-box test techniques can accomplish assessment for unimplemented or missing requirements.

White-box test design techniques include the following code coverage criteria:

Overview

White-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 all 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 reduce hidden errors later on.[2] 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.[2]

Levels

  1. Unit testing. White-box testing is done during unit testing to ensure that the code is working as intended, before integration happens with previously tested code. White-box testing during unit testing potentially catches many defects early on and aids in addressing defects that happen later on after the code is integrated with the rest of the application and therefore reduces the impacts of errors later in development.[2]
  2. Integration testing. White-box testing at this level is written to test the interactions of interfaces with each other. The unit level testing made sure that each code was tested and working accordingly in an isolated environment and integration examines the correctness of the behaviour in an open environment through the use of white-box testing for any interactions of interfaces that are known to the programmer.[2]
  3. Regression testing. White-box testing during regression testing is the use of recycled white-box test cases at the unit and integration testing levels.[2]

Basic procedure

White-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 it 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:

  1. Input involves different types of requirements, functional specifications, detailed designing of documents, proper source code and security specifications.[citation needed] This is the preparation stage of white-box testing to lay out all of the basic information.
  2. Processing involves performing risk analysis to guide whole testing process, proper test plan, execute test cases and communicate results.[citation needed] This is the phase of building test cases to make sure they thoroughly test the application the given results are recorded accordingly.
  3. Output involves preparing final report that encompasses all of the above preparations and results.[citation needed]

Advantages

  1. Side effects of having the knowledge of the source code is beneficial to thorough testing.[citation needed]
  2. Optimization of code becomes easy as inconspicuous bottlenecks are exposed.[citation needed]
  3. Gives the programmer introspection because developers carefully describe any new implementation.[citation needed]
  4. Provides traceability of tests from the source, thereby allowing future changes to the source to be easily captured in the newly added or modified tests.[3]
  5. Easy to automate.[4]
  6. Provides clear, engineering-based rules for when to stop testing.[5][4]

Disadvantages

  1. White-box tests are written to test the details of a specific implementation. This means that the tests will fail when the implementation changes as the test is tightly coupled to the implementation. Additional work has to be done to update the tests so they match the implementation again when it is changed. On the other hand with black-box testing, tests are independent of the implementation, and so they will still run successfully if the implementation changes but the output or side-effects of the implementation do not.
  2. The code under test could be rewritten to implement the same functionality in a different way that invalidates the assumptions baked into the test. This could result in tests that fail unnecessarily or, in the worst case, tests that now give false positives and mask errors in the code. The white-box test never was written such that it tests the intended behavior of the code under test, but instead only such that the specific implementation does what it does.
  3. White-box testing brings complexity to testing because the tester must have knowledge of the program, or the test team needs to have at least one very good programmer who can understand the program at the code level. White-box testing requires a programmer with a high level of knowledge due to the complexity of the level of testing that needs to be done.
  4. On some occasions, it is not realistic to be able to test every single existing condition of the application and some conditions will be untested.
  5. The tests focus on the software as it exists, and missing functionality may not be discovered.

Modern view

A 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.[4] 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.[citation needed]

Hacking

In penetration testing, white-box testing refers to a method where a white hat hacker has full knowledge of the system being attacked.[6] 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. For such a penetration test, administrative credentials are typically provided in order to analyse how or which attacks can impact high-privileged accounts.[7] Source code can be made available to be used as a reference for the tester. When the code is a target of its own, this is not (only) a penetration test but a source code security audit (or security review).[8]

See also

References

  1. ^ Stacy Nelson (June 2003), NASA/CR–2003-212806 Certification Processes for Safety-Critical and Mission-Critical Aerospace Software (PDF), Ames Research Center, p. 25, [Glossary] White Box Testing: Design-driven testing where engineers examine internal workings of code
  2. ^ a b c d e Williams, Laurie. "White-Box Testing" (PDF). pp. 60–61, 69. Archived from the original (PDF) on 3 March 2016. Retrieved 13 February 2013.[verification needed]
  3. ^ Binder, Bob (2000). Testing Object-oriented Systems. Addison-Wesley Publishing Company Inc. ISBN 9780201809381.
  4. ^ a b c Ammann, Paul; Offutt, Jeff (2008). Introduction to Software Testing. Cambridge University Press. ISBN 978-0-521-88038-1.
  5. ^ Myers, Glenford (1979). The Art of Software Testing. John Wiley and Sons. ISBN 9780471043287.
  6. ^ "A Penetration Testing Model" (PDF). Federal Office for Information Security (BSI).
  7. ^ Baran, Ewelina. "Types of penetration testing". Blaze Information Security GmbH. Retrieved 12 September 2024.
  8. ^ Sullivan, James. "What is Code Audit: Understanding its Purpose and Process". 17 Web Dev, LLC. Retrieved 12 September 2024.

Read other articles:

قرية دانيمورا   الإحداثيات 44°43′15″N 73°43′08″W / 44.7208°N 73.7189°W / 44.7208; -73.7189  [1] تقسيم إداري  البلد الولايات المتحدة[2]  التقسيم الأعلى مقاطعة كلينتون، نيويورك  خصائص جغرافية  المساحة 3.127197 كيلومتر مربع2.972604 كيلومتر مربع (1 أبريل 2010)  ارتفاع 431 م...

 

Peta lokasi Kabupaten Kutai Timur Berikut adalah daftar kecamatan dan kelurahan di Kabupaten Kutai Timur, Provinsi Kalimantan Timur, Indonesia. Kabupaten Kutai Timur terdiri dari 18 kecamatan, 2 kelurahan, dan 139 desa. Pada tahun 2017, jumlah penduduknya mencapai 416.800 jiwa dengan luas wilayah 35.747,50 km² dan sebaran penduduk 12 jiwa/km².[1][2] Daftar kecamatan dan kelurahan di Kabupaten Kutai Timur, adalah sebagai berikut: Kode Kemendagri Kecamatan Jumlah Kelurahan Jum...

 

У этого термина существуют и другие значения, см. 11-й полк. 11-й пехотный Псковский генерал-фельдмаршала князя Кутузова-Смоленского полк Полковой нагрудный знак Годы существования 1700—1918 Страна  Российская империя Входит в 3-я пех. див-я, 17 АК, МВО Дислокация Тула Знаки отл

此條目已列出參考文獻,但因為沒有文內引註而使來源仍然不明。 (2019年8月22日)请加上合适的文內引註来改善这篇条目。 此條目可参照英語維基百科相應條目来扩充。 (2019年8月22日)若您熟悉来源语言和主题,请协助参考外语维基百科扩充条目。请勿直接提交机械翻译,也不要翻译不可靠、低品质内容。依版权协议,译文需在编辑摘要注明来源,或于讨论页顶部标记{{Translate...

 

Public high school in O'Fallon, Missouri, U.S. This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Fort Zumwalt West High School – news · newspapers · books · scholar · JSTOR (December 2015) (Learn how and when to remove this template message) Fort Zumwalt West High SchoolAddress1251 Turtle Creek Dr.O'Fallon, MO...

 

Дондушень Donduşeni   Країна  Молдова Адміністративний центр Дондюшани Губернатор Вадим Лєснік ISO 3166 код MD-DN Площа 645,0 км² Населення 46 442 осіб Густота населення 72,0 осіб/км²   Поштовий індекс 251 Телефонний код +373 51 Автомобільні номери DN   Дондушенський район або Дондуше

Карпатские диалекты цыганского языка Страны  Чехия[1] Словакия[2] Общее число говорящих 150 000 чел.[3] Классификация индоевропейские языки индоиранские языки индоарийские языки центральные индо-арийские языки[d] цыганский язык Карпатские диалекты цы...

 

For other uses, see John Decker (disambiguation). Not to be confused with John Decker (artist). Jon DeckerDecker in 2017BornJonathan P. DeckerOctober 18, 1966[1]Washington, D.C., USEducationUniversity of Pennsylvania (B.A., M.A.)George Washington University (J.D.)Occupation(s)Journalist, radio host, White House correspondentNotable creditFox News Radio Jonathan P. Decker is an American journalist and White House correspondent. Since 1995, he has served as a member of the White House p...

 

Italian sprinter Giovanni PuggioniPuggioni in 1996.Personal informationNicknameGianni[1]National teamItaly: 21 caps (19898-1999)[2]Born (1966-03-19) March 19, 1966 (age 57)Sassari, ItalyHeight1.77 m (5 ft 10 in)Weight70 kg (154 lb)SportCountryItalySportAthleticsEventSprintClub CUS Sassari (1985-1988)[2] Fiamme Gialle (1989-2000)[3] Retired2011[4]Achievements and titlesPersonal bests 100 m: 10.36 (1995) 200 m: 20.44 (19...

Some of this article's listed sources may not be reliable. Please help this article by looking for better, more reliable sources. Unreliable citations may be challenged or deleted. (August 2016) (Learn how and when to remove this template message) This article may contain improper references to user-generated content. Please help improve it by removing references to unreliable sources, where they are used inappropriately. (August 2016) (Learn how and when to remove this template message) 13th...

 

Stasiun Pariaman P12 Aktivitas penumpang di Stasiun Pariaman, 2019.LokasiJalan Pangeran DiponegoroKampung Pondok I, Pariaman Tengah, Pariaman, Sumatera BaratIndonesiaKetinggian+2 mOperatorKereta Api IndonesiaDivisi Regional II Sumatera BaratLetak dari pangkalkm 60+520 lintas Teluk Bayur–Padang–Lubuk Alung–Naras[1]Jumlah peron3 (satu peron sisi dan dua peron pulau yang sama-sama agak rendah)Jumlah jalur2 (jalur 1: sepur lurus)Informasi lainKode stasiunPMN7103[2]Klasifikas...

 

Census region of the US This article is about the political region. For the geographically southern part of the United States, see Sun Belt. For the cultural region of the southern United States, see Dixie. RegionSouthern United StatesRegion Left-right from top: Houston skyline, Jackson Square in New Orleans, Florida International University in Florida, Rainbow Row in Charleston, Virginia State Capitol in Richmond, Ryman Auditorium in Nashville, Great Smoky Mountains, Atlanta skyline, Tenness...

一般県道 佐賀県道234号 有田停車場線一般県道 有田停車場線 起点 佐賀県西松浦郡有田町本町【北緯33度10分59.5秒 東経129度52分55.3秒 / 北緯33.183194度 東経129.882028度 / 33.183194; 129.882028 (県道234号終点)】 終点 佐賀県西松浦郡有田町本町【北緯33度10分51.0秒 東経129度52分49.4秒 / 北緯33.180833度 東経129.880389度 / 33.180833; 129.880389 (県道...

 

Organisation promoting cultural and linguistic knowledge of the United Kingdom British CouncilFounded1934; 89 years ago (1934)FounderBritish governmentTypeCultural institutionHeadquarters1 Redman Place, Stratford, London E20 1JQ, England, United KingdomArea served WorldwideProductBritish cultural and language educationKey peopleSarah Sands (acting Chair)Scott McDonald (Chief Executive)Revenue (2020–21) £924,965,472[1]Expenses (2020–21)£1,015,114,434[1]W...

 

U.S. House district for North Carolina North Carolina's 10th congressional districtInteractive map of district boundaries since January 3, 2023Representative  Patrick McHenryR–Lake Norman of CatawbaDistribution63.35% urban36.65% ruralPopulation (2022)768,814[1]Median householdincome$64,668[1]Ethnicity75.7% White11.5% Black7.7% Hispanic2.8% Asian2.5% Native American0.1% Pacific Islander Americans0.1% otherCook PVIR+22[2]Created1903 North Carolina's 10th congressi...

Lists of South Korean films by year ← 1981 1982 1983 → Korean Animation Full list . . Pre-1948 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 •00000•00...

 

Indian baseball player This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: Appoorva Muralinath – news · newspapers · books · scholar · JSTOR (January 2018) (Learn how and when to remove this templat...

 

Questa voce sull'argomento centri abitati della Virginia Occidentale è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Huntingtoncity(EN) City of Huntington, West Virginia Huntington – Veduta LocalizzazioneStato Stati Uniti Stato federato Virginia Occidentale ConteaCabell AmministrazioneSindacoSteve Williams (D) TerritorioCoordinate38°25′N 82°26′W / 38.416667°N 82.433333°W38.416667; -82.433333 (Huntington)Coordinate:...

Professional wrestling stable SAnitY redirects here. For other uses, see Sanity (disambiguation). Professional wrestling stable SanitySAnitY in 2017. In front of the ropes: Eric Young (right) and Killian Dain (left), with Alexander Wolfe on the left talking to Nikki Cross outside the ringStableFormermember(s)Alexander Wolfe/Axel TischerKillian DainEric Young (leader)Sawyer FultonNikki CrossDebutOctober 12, 2016DisbandedApril 16, 2019Years active2016–20192022 Sanity (stylized as SAni†Y or ...

 

Super Mario 64 Обложка североамериканского издания игры для Nintendo 64 Разработчик Nintendo EAD Издатель Nintendo Часть серии Super Mario Даты выпуска Nintendo 64: 23 июня 1996 29 сентября 1996 29 сентября 1996 1 марта 1997 1 марта 1997 iQue: 18 ноября 2003 Nintendo DS: 21 ноября 2004 2 декабря 2004 24 февраля 2005 11 марта 2005 21 июня 2007 26 ию...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!