Structural logic testing, also known as structured testing examines the internal structure of a software component, such as statements, decisions, branches, and paths. It analyzes various structures such as menu layout, specific business processes, and web page organization. White box testing, or glass box testing, is another term for structured-based testing. It allows software testers to access and evaluate the software code.
Structure-Based Testing Techniques
Structure-based testing techniques are applied when software integrates with other components.
The following structure-based techniques are applicable at all stages of software testing:
Distinct paths - This method is used for testing software navigation. Technically, distinct paths are traced from one point to another. For instance, on a clothing website, you can choose a pair of jeans from the home page, the Jeans' webpage, or a related page. There are at least three paths to select the jeans, all leading to the shopping cart. In this scenario, different paths direct the user to the shopping cart webpage.
Decision - This technique assesses IF, LOOPS, and CASE statements in software code. The tester examines the results of these statements to verify the accuracy of the decision. The expected outcomes are TRUE or FALSE with IF and LOOP statements. For example, when a user clicks the Add to Cart button, the product should be added to the shopping cart. If the product is added to the cart, the result is TRUE; otherwise, it is FALSE.
Statements - This method focuses on the number of executable statements that can be tested within a test suite (a set of test cases). Testers can conduct one or more tests based on a single line of code. Instead of testing separately, statements can also be grouped and tested together.
Branches - Branches are associated with the decision technique as they originate from decision points. By considering decision and statement coverages together, similar outcomes can be achieved.
Structure-based testing is useful when you want to maximize test coverage. You can exercise ad hoc and black box testing, however, structured-based testing provides additional coverage. It is important to note that structured-based testing requires software testers to have coding skills.
Reference: Black, R., Van Veenendaal, E., & Graham, D. (2012) (3rd Edition). Foundations of Software Testing. ISTQB Certification. Delhi, India. Cengage Learning.
Comments