Nepedia
Back to Discover
Advanced Reader
💻

Software testing

technology Maturity 9-11 war conflict Next article →

This article covers sensitive topics: war_conflict. Parents can manage visibility in Parental Controls.

Software testing is the process of checking if software meets its intended objectives. It ensures that a program satisfies the expectations of its users or sponsors. This practice provides objective and independent information about software quality. It also helps stakeholders understand the risk of potential failure. Testing can confirm if software works correctly in specific scenarios. However, it cannot prove correctness for every possible scenario. It is impossible for testing to find every single bug.

Black box diagram
Black box diagram

To find problems, testers use an oracle to measure correctness. An oracle is a way to determine if a result is right or wrong. Common oracles include technical specifications, legal standards, or existing contracts. Testers might also compare a new product to past versions or similar products. They can use customer expectations or inferred purposes as guides. By using these oracles, testers can recognize when a program behaves incorrectly. This process helps answer if the software does what it is supposed to do.

Testing can be categorized by how the software is examined. Static testing involves reviewing code and documentation without running the program. This is similar to proofreading a text for errors. It includes activities like inspections, walkthroughs, or using tools to check code structure. Dynamic testing occurs when the software is actually executed. Testers run the code with specific test cases to see the actual output. They then compare this output to the expected result. Passive testing is another method where testers observe system logs and traces. They do not interact with the software but instead look for patterns.

White Box Testing Approach
White Box Testing Approach

Testers also use different perspectives called white-box and black-box testing. White-box testing, also called structural testing, examines the internal workings of the code. The tester uses programming skills to choose inputs that exercise specific paths through the program. This is like testing individual nodes in an electrical circuit. They may use techniques like API testing or fault injection to find errors. They also use code coverage to see how much of the program has been executed. A hybrid approach that uses both methods is called grey-box testing.

White Box Testing Approach
White Box Testing Approach

Black-box testing, or functional testing, ignores the internal code entirely. The tester only knows what the software is supposed to do for the user. They design test cases based on external descriptions like requirements or designs. This includes methods like boundary value analysis or fuzz testing. Another variation is component interface testing. This focuses on the data values passed between different parts of a system. Testers might check "message packets" to ensure data is valid before it moves to the next unit.

Black box diagram
Black box diagram

The history of this field changed significantly in 1979. Glenford J. Myers introduced the idea of separating testing from debugging. Debugging is the process of fixing a defect in the code. Before this, the two activities were often grouped together. Testing is used to find bugs, while debugging is used to fix them. A bug is a defect that causes an undesirable result. Not all defects lead to a failure. For example, a defect in "dead code" that never runs will not cause a failure. However, a defect might cause a failure later due to environmental changes.

TestingCup-Polish-Championship-in-Software-Testing-Katowice-2016
TestingCup-Polish-Championship-in-Software-Testing-Katowice-2016

Software testing is vital for the global economy. A 2002 study by NIST reported that bugs cost the U.S. economy $59.5 billion every year. The study suggested that more than one-third of this cost could be avoided with better testing. Because of these costs, many companies outsource testing to countries like China, India, Pakistan, or the Philippines. Testing also addresses non-functional requirements. These include scalability, security, performance, and maintainability. By using a "test pyramid," developers can organize tests into unit, integration, and end-to-end levels to maximize efficiency.

620 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (3)
File:TestingCup-Polish-Championship-in-Software-Testing-Katowice-2016.jpg
TestingCup-Polish-Championship-in-Software...
File:White Box Testing Approach.png
White Box Testing Approach.png
File:Black box diagram.svg
Black box diagram.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.