Control structure testing in software engineering

  1. Structural Testing
  2. Control Structure Testing
  3. Control Flow Software Testing


Download: Control structure testing in software engineering
Size: 37.3 MB

Structural Testing

• A • • • • • • • • • • • • • • • • B • • • • • • • • • • • • • • • • • • • • C • • • • • • • • • • • • • • • • • • • • • • • • • D • • • • • • • • • • • • • • • • • • • E • • • • • • • • • • • • • F • • • • • • • • • • • G • • • • • • H • • • • I • • • • • • • • • • • • • K • • • • L • • • • • • • M • • • • • • • • N • • • O • • • P • • • • • • • • • • • • • • • • • • • Q • • • • R • • • • • • • • • • • • • • • • S • • • • • • • • • • • • • • • • • • • • • • • • • • T • • • • • • • • • • • • • • • • • • • • • • • • • • • • U • • • • • • • V • • • • • • • W • • • • Useful Resources • • • Selected Reading • • • • • • • What is Structural Testing ? Structural testing, also known as glass box testing or white box testing is an approach where the tests are derived from the knowledge of the software's structure or internal implementation. The other names of structural testing includes clear box testing, open box testing, logic driven testing or path driven testing. Structural Testing Techniques: • Statement Coverage - This technique is aimed at exercising all programming statements with minimal tests. • Branch Coverage - This technique is running a series of tests to ensure that all branches are tested at least once. • Path Coverage - This technique corresponds to testing all possible paths which means that each statement and branch are covered. Calculating Structural Testing Effectiveness: Statement Testing = (Number of Statements Exercised / Total Number of Statements) x 100 ...

Control Structure Testing

Control Structure Testing Control structure testing is a part of White Box Testing. It includes the following methods: • Conditional Testing • Loop Testing • Data Validation Testing • Branch Testing/Path Testing Conditional Testing It is an approach to design test cases to exercise the logical conditions contained in a program module of an application. Loop Testing Loop testing is a white box testing technique that focuses exclusively on the validity of a loop construct. Types of Loops • Simple Loop • Nested Loop • Concatenated Loop • Unstructured Loop Graphical Image of Types of Loops Simple Loop Testing A simple loop is tested in the following way: • Skip the entire loop. • Make 1 pass through the loop. • Make 2 passes through the loop. • Make m passes through the loop where m

UNIT

Contents • • • • • • • • • • • • • Que 1. What is software testing (software testing fundamentals)? State the software testing objectives and principles. Software testing techniques provide systematic guidance for designing tests that • Exercise the internal logic of software components, and • Exercise the input and output domains of the program to uncover errors in program function, behavior and performance. Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design, and code generation. A) Testing Objectives In an excellent book on software testing, Glen Myers states a number of rules that can serve well as testing objectives:- • Testing is a process of executing a program with the intent of finding an error. • A good test case is one that has a high probability of finding an as-yet undiscovered error. • A successful test is one that uncovers an as-yet- undiscovered error. These objectives imply a dramatic change in viewpoint. • They move counter to the commonly held view that a successful test is one in which no errors are found. • Our objective is to design tests that systematically uncover different classes of errors and to do so with a minimum amount of time and effort. • If testing is conducted successfully according to the objectives stated previously, it will uncover errors in the software. • As a secondary benefit, testing demonstrates that software functions appear to be working according to s...

Control Flow Software Testing

Control flow testing is a type of This type of testing method is often used by developers to test their own code and own implementation as the design, code and the implementation is better known to the developers. This testing method is implemented with the intention to test the logic of the code so that the user requirements can be fulfilled. Its main application is to relate the small programs and segments of the larger programs. • Control Flow Graph Creation: From the given source code a control flow graph is created either manually or by using the software. • Coverage Target: A coverage target is defined over the control flow graph that includes nodes, edges, paths, branches etc. • Test Case Creation: Test cases are created using control flow graphs to cover the defined coverage target. • Test Case Execution: After the creation of test cases over coverage target, further test cases are executed. • Analysis: Analyze the result and find out whether the program is error free or has some defects. Control Flow Graph is a graphical representation of control flow or computation that is done during the execution of the program. Control flow graphs are mostly used in static analysis as well as compiler applications, as they can accurately represent the flow inside of a program unit. Control flow graph was originally developed by Frances E. Allen. Cyclomatic Complexity is the quantitative measure of the number of linearly independent paths in it. It is a software metric used to ...