Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop Testing Forum : Software Testing @ OneStopTesting : Beginners @ OneStopTesting |
Topic: Control Structure testing |
|
Author | Message |
tanushree
Senior Member Joined: 04Apr2007 Online Status: Offline Posts: 2160 |
Topic: Control Structure testing Posted: 18Oct2007 at 12:56am |
Control Structure testing.
In programs, conditions are very important and testing such conditions is more complex than other statements like assignment and declarative statements. Basic path testing is one example of control structure testing. There are many ways in which control structure can be tested. Conditions Testing Condition testing aims to exercise all logical conditions in a program module. Logical conditions may be complex or simple. Logical conditions may be nested with many relational operations. Can define: • Relational expression: (E1 op E2), where E1 and E2 are arithmetic expressions. For example, (x+y) – (s/t), where x, y, s and t are variables. • Simple condition: Boolean variable or relational expression, possibly proceeded by a NOT operator. • Compound condition: composed of two or more simple conditions, Boolean operators and parentheses along with relational operators. • Boolean expression: Condition without relational expressions. Normally errors in expressions can be due to due to one or all or the following: • Boolean operator error • Boolean variable error • Boolean parenthesis error • Relational operator error • Arithmetic expression error • Mismatch of types Condition testing methods focus on testing each condition in the program of any type of conditions. There are many strategies to identify errors. Some of the strategies proposed include: • Branch testing: Every branch is executed at least once. • Domain Testing: Uses three or four tests for every relational operator depending on the complexity of the statement. • Branch and relational operator testing: Uses condition constraints. Based on the complexity of the relational operators, many branches will be executed. Example 1: C1 = B1 & B2 • where B1, B2 are boolean conditions.. • Condition constraint of form (D1,D2) where D1 and D2 can be true (t) or false(f). • The branch and relational operator test requires the constraint set {(t,t),(f,t),(t,f)} to be covered by the execution of C1. Coverage of the constraint set guarantees detection of relational operator errors. Edited by tanushree - 18Oct2007 at 12:59am Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.