Software Testing Strategies and Techniques



Similar documents
Different Approaches to White Box Testing Technique for Finding Errors

Introduction to Computers and Programming. Testing

An Analysis on Objectives, Importance and Types of Software Testing


CS 451 Software Engineering Winter 2009

APPROACHES TO SOFTWARE TESTING PROGRAM VERIFICATION AND VALIDATION

Software Testing Interview Questions

Latest Research and Development on Software Testing Techniques and Tools

International Journal of Advance Research in Computer Science and Management Studies

Karunya University Dept. of Information Technology

Logistics. Software Testing. Logistics. Logistics. Plan for this week. Before we begin. Project. Final exam. Questions?

EVALUATING METRICS AT CLASS AND METHOD LEVEL FOR JAVA PROGRAMS USING KNOWLEDGE BASED SYSTEMS

Software Testing. Knowledge Base. Rajat Kumar Bal. Introduction

Advancements in the V-Model

Comparing the Testing Approaches of Traditional, Object-Oriented and Agent- Oriented Software System

Standard for Software Component Testing

Definitions. Software Metrics. Why Measure Software? Example Metrics. Software Engineering. Determine quality of the current product or process

Software testing. Objectives

Survey of Web Testing Techniques

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.

SOFTWARE ENGINEERING INTERVIEW QUESTIONS

SOFTWARE TESTING STRATEGY APPROACH ON SOURCE CODE APPLYING CONDITIONAL COVERAGE METHOD

Elite: A New Component-Based Software Development Model

How To Develop Software

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

Formal Software Testing. Terri Grenda, CSTE IV&V Testing Solutions, LLC

1 White-Box Testing by Stubs and Drivers

Test-Driven Development Issues for Right to Left Language Applications

Software Engineering Introduction & Background. Complaints. General Problems. Department of Computer Science Kent State University

Sofware Requirements Engineeing

EPL603 Topics in Software Engineering

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

CSTE Mock Test - Part III Questions Along with Answers

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Name of chapter & details

Glossary of Object Oriented Terms

IT3205: Fundamentals of Software Engineering (Compulsory)

Software Engineering/Courses Description Introduction to Software Engineering Credit Hours: 3 Prerequisite: (Computer Programming 2).

(Refer Slide Time: 01:52)

Software Engineering. Software Testing. Based on Software Engineering, 7 th Edition by Ian Sommerville

Software Testing, Mythology & Methodologies

Proposed Software Testing Using Intelligent techniques (Intelligent Water Drop (IWD) and Ant Colony Optimization Algorithm (ACO))

Software Test Plan (STP) Template

ABSTRACT. would end the use of the hefty 1.5-kg ticket racks carried by KSRTC conductors. It would also end the

Keywords Class level metrics, Complexity, SDLC, Hybrid Model, Testability

Software Engineering Question Bank

Testing Introduction. IEEE Definitions

Total Quality Management (TQM) Quality, Success and Failure. Total Quality Management (TQM) vs. Process Reengineering (BPR)

Test Case Design Techniques

AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities

COURSE CODE : 4072 COURSE CATEGORY : A PERIODS / WEEK : 4 PERIODS / SEMESTER : 72 CREDITS : 4

Umbrella: A New Component-Based Software Development Model

Chapter 11: Integration- and System Testing

Domains and Competencies

Fault Analysis in Software with the Data Interaction of Classes

Software Development Processes. Software Life-Cycle Models

Test Specification. Introduction

CS 389 Software Engineering. Lecture 2 Chapter 2 Software Processes. Adapted from: Chap 1. Sommerville 9 th ed. Chap 1. Pressman 6 th ed.

How To Understand Software Engineering

Revision History Revision Date Changes Initial version published to

Software Development Processes. Software Life-Cycle Models. Process Models in Other Fields. CIS 422/522 Spring

CSTE Mock Test - Part I - Questions Along with Answers

Software Engineering. What is a system?

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

Test case design techniques I: Whitebox testing CISS

CS6403-SOFTWARE ENGINEERING UNIT-I PART-A

A Test Case Generator for the Validation of High-Level Petri Nets

International Journal of Advancements in Research & Technology, Volume 3, Issue 2, February ISSN

What is a life cycle model?

Fault Localization in a Software Project using Back- Tracking Principles of Matrix Dependency

Evolution Feature Oriented Model Driven Product Line Engineering Approach for Synergistic and Dynamic Service Evolution in Clouds

Basic Testing Concepts and Terminology

Improved Software Testing Using McCabe IQ Coverage Analysis

Software Testing Tutorial

Software Engineering. How does software fail? Terminology CS / COE 1530

Software Testing & Analysis (F22ST3): Static Analysis Techniques 2. Andrew Ireland

The Software Lifecycle. Software Lifecycles

Levels of Software Testing. Functional Testing

Introduction to Testing Webservices

1) Explain the following evolutionary process models: a) The spiral model. b) The concurrent development model.

Programming and Software Development CTAG Alignments

Requirements-Based Testing - Cause-Effect Graphing. Gary E. Mogyorodi, B.Math., M.B.A. Principal Consultant. Software Testing Services

Random Testing: The Best Coverage Technique - An Empirical Proof

Introduction to Automated Testing

Automated Test Approach for Web Based Software

How To Cluster Of Complex Systems

CHAPTER 20 TESING WEB APPLICATIONS. Overview

Analysis and Evaluation of Quality Metrics in Software Engineering

Software Testing. Quality & Testing. Software Testing

A. Waterfall Model - Requirement Analysis. System & Software Design. Implementation & Unit Testing. Integration & System Testing.

InfiniteGraph: The Distributed Graph Database

Component Based Development in Software Engineering

Transcription:

Software Testing Strategies and Techniques Sheetal Thakare 1, Savita Chavan 2, Prof. P. M. Chawan 3 1,2 MTech, Computer Engineering VJTI, Mumbai 3 Associate Professor, Computer Technology Department, VJTI, Mumbai. 1 sheetal.thakare@gmail.com 2 savita.chavan08@yahoo.com 3 pmchawan@vjti.org.in Abstract: This paper discusses different software strategies such as unit testing, integration testing, validation testing and techniques such as white box and black box testing for conventional and object oriented software development. Strategy provides a guideline to conduct testing. The testing carried out at different stages in software development life cycle is described by the various testing methods. Keywords: Test cases, integration, cyclomatic complexity, security testing, performance testing, stress testing, recovery testing. I. INTRODUCTION A process of executing a program with the goal of finding errors is Software Testing. A Software Testing Strategy helps to convert test case designs into a wellplanned execution steps that will result in the construction of successful software. Software testing aims at uncovering the errors in software. So the primary goal of test cases is to derive set of tests that have highest probability of uncovering the errors. Software testing is a series of process which is designed to make sure that the computer code does what it was designed to do. Software testing is a destructive process of trying to find the errors. The main purpose of testing can be quality assurance, reliability estimation, validation or verification. II. SOFTWARE TESTING STRATEGY Testing is the set of activities that can be planned in advance and conducted systematically. To define these activities templates are provided by different testing strategies. All the strategies have following characteristics: 1. A software team should conduct effective formal reviews. This eliminates many errors before testing starts. 2. Testing begins at component level and works outward towards the integration of entire computer based system. 3. Different testing techniques are appropriate at different points in time. 4. Testing is conducted by the developer and for large project, an independent test group. 5. Testing and debugging are different activities, but debugging must be included in any testing strategy. For large projects independent test group (ITG) is hired to remove conflict of interest that may be present if software is been tested by developers only. This is because ITG is paid to find errors. 1.1 Strategy for conventional software Architecture Conventional software development is a spiral process. The testing may also be viewed in context of spiral. 2.1.1 Unit testing: At vertex of spiral, testing begins with unit testing. It aims at testing each component or unit of software to check its functionality, independently. Ensures that it works properly as a unit. Typical units are Interface: tested to check proper flow of information into and out of the program unit under test. Local data structures: tested to check integrity of data during execution. Boundary conditions: tested to ensure unit operates properly at boundaries to limit processing. Independent paths: tested to ensure all statements in the unit are executed at least once. Error handling paths: tested to check whether error messages are user friendly and corresponds to error encountered, whether they reroute or terminate process when error occurred. Common errors found during unit testing are: incorrect initialization, precision inaccuracy, mixed mode operation, incorrect arithmetic precedence etc. 682

2.1.2 Integration testing: Further progressing the testing process, these units must be assembled or integrated to form complete software package. So integration testing focuses the problems of verification and construction. 2.1.3 Validation testing: Taking one more outward turn along spiral, comes validation testing. It consists of higher order tests using validation criteria defined during requirement analysis phase. This test assures that software meets all functional, behavioral and performance requirements. This testing uses SRS s validation criteria section for reference. This testing also includes alpha and beta tests. Both are performed by users. The reason is developers can never predict or know how user will be really using the software. Alpha testing is done at developer s place by end-user while beta testing is done by user at user-site. 1.2 Strategy for object oriented Architecture Strategy for object oriented Architecture are: 2.2.1 Unit testing in Object oriented context Concept of unit testing in OO context differs from conventional approach. Operation is the smallest unit of testing. As here operation may be inherited, it will have different context in different classes. So unit testing for OO software is driven by operations encapsulated by the class and state behavior of the class. 2.2.2 Integration testing Object oriented context Three approaches used are: Thread based testing- threads are sets of classes in OO approach. All the classes responding to one input or event form a set. Each thread is tested individually. User based testing- focuses on independent classes. These classes don t collaborate with other classes. Then dependent classes, those which use independent classes, are tested. Cluster testing- collaborating classes form a cluster, this testing is used to uncover errors in the collaboration. 2.2.3 Validation Testing: It follows the integration testing. At this level testing procedures are same in conventional as well as OO approach. It focuses on user visible actions and user recognizable output from the system, so that software functions in the way required by customer. All the requirements of the customer are specified in a document called as software requirement specification (SRS). Figure 1: Software Testing Strategies III. SYSTEM TESTING System comprises of hardware, people, information and software is only the one component of it. It includes recovery testing, security testing, stress testing and performance testing. To test fault tolerance of system, recovery testing fails the software using several inputs and verifies that recovery is performed properly. Security testing verifies the protection mechanism built into system. For this tester will play the role of intruder or hacker and will try to find a key to system entry. In this regard designer of system should design a system in such a way that hacking should be costlier than information obtained from it. Stress testing will check how the system works under abnormal conditions. Abnormal conditions will include generating more interrupts than average rate, increased input data rate, giving input with maximum memory or resources requirements etc. 683

A variation of stress testing called sensitivity testing identifies the data combinations within valid input classes that can cause improper processing. After performing all above tests finally performance test is conducted to check run time performance of software within the context of an integrated system. 1) Independent paths within a module have been exercised at least once. 2) All logical decisions are tested for their both sides, true and false. 3) All loops are tested at their boundaries and within their operational bounds. 4) Internal data structures are ensured for their validity. 4.1.1 Basic Path Testing: test cases are designed to satisfy goal 1) as listed above. The different techniques used in these tests are: 1. Flow graph notation: Main components of that graphs are: Node it represents one or more procedural statements. Node which contains a condition is called predicate node. Edges between nodes represent flow of control. Each node must be bounded by at least one edge, even if it does not contain any useful information. Region an area bounded by nodes and edges. Figure 2: General classification of tests techniques IV. SOFTWARE TESTING METHODOLOGIES To accomplish the goal of finding errors two methodologies are used in conventional as well as object oriented approach: white box testing and black box testing. White box tests focus on control structure in program, to verify all the statements in program are executed at least once as well as all logical conditions are exercised. It includes basis path testing, condition and data flow testing, program logic and loop testing. Unlike white box testing Black box testing does not require knowledge of program internal working. Testing is carried out to verify functional requirements. It includes equivalent partitioning, boundary value analysis, fault based testing, random testing, partition testing, cause effect graphic technique. 4.1 White Box Testing Method is also called as glass box testing. Includes the test cases that guarantee that Figure 3: Different versions of Flow Graph Notation 2. Independent Paths: The path which includes at least one new set of processing statement or new condition is said to be a independent path. For flow graph, it moves along at least one edge that has not been traversed before the path is defined. For figure 6 independent paths are : Path 1: 1-2-4-7-8 Path 2: 1-2-3-5-7-8 Path 3: 1-2-3-6-7-8 These paths from 1 to 3 form basis set for Basic path testing. Now test cases are designed to force execution of each at least once. 684

How many paths to look for is decided by a software metric called cyclomatic complexity. The value evaluated for cyclomatic complexity defines the number of independent paths in the basis set of a program. For the given graph G, cyclomatic complexity V (G) is equal to: 1. The number of regions in the flow graph. 2. V (G) = E - N + 2, where E is the number of edges, and N is the number of nodes. 3. V (G) = P + 1, where P is the number of predicate nodes. The core of this technique is: one draws the flow graph according to the design or code, one determines its cyclomatic complexity; cyclomatic complexity can be determined without a flow graph in that case one computes the number of conditional statements in the code after that, one determines a basis set of the linearly independent paths; the predicate nodes are useful when necessary paths must be determined at the end, one prepares test cases by which each path in the basis set will be executed. Each test case will be executed and compared to the expected results. Path 3:1-2-3-10-11-13 Path 4:1-2-3-4-5-8-9-2 Path 5:1-2-3-4-5-6-8-9-2 Path 6:1-2-3-4-5-6-7-8-9-2. 4.1.2 Control Structure Testing: test cases are designed to satisfy goal 2) and 3) as listed above. The different techniques used in these tests are: Condition Testing: tests all logical conditions in program. Data Flow Testing : test cases are selected as per locations of definitions and uses of variables in the program 4.1.3 Loop Testing: focuses on validity of loop constructs. There are four types of loops: a. Simple loops b. Concatenated loops c. Nested loops d. Unstructured loops a. Simple loops It is possible to execute the following tests: 1. Skip the loop entirely 2. Only one pass through the loop 3. Two passes through the loop 4. m passes through the loop where m<n 5. N-1, N, N+1 passes through the loop, where n is the maximum number of allowable passes through the loop. A typical simple loop is depicted in Figure 5. Figure 4: Flow graph Cyclomatic complexity for flow graph which is represented in Figure 4 is: V (G) = E N + 2 = 17 13 + 2 = 6. So, the basis set of independent paths is: Path 1:1-2-10-11-13 Path 2:1-2-10-12-13 685 b. Nested Loops Figure 5: Simple Loop If one uses this type of loops, it can be possible that the number of probable tests increases as the level of nesting grows. So, one can have an impractical number of tests. To correct this, it is recommended to use the following approach: 1. Start at the innermost loop, and set all other loops to minimum values. 2. Conduct simple loop tests for the innermost loop and holding the outer loop at their minimum iteration parameter value.

3. Work outward, performing tests for the next loop. 4. Continue until all loops have been tested. A typical nested loop is depicted in Figure 6. 4.2 Black Box Testing Method is also called as behavior testing. Finds errors of types Incorrect or missing function, Interface error, Errors in data structures or external database access, behavior or performance of error, initialization and termination errors. White box testing is performed before Black box testing. 4.2.1 Equivalent Partitioning c. Concatenated Loops Figure 6: Nested Loop These loops are tested using simple loop tests if each loop is independent from the other. Otherwise, nested loops tests are used. A typical concatenated loop is presented in Figure 7. Divided program input domain into classes of data that consist of set of valid or invalid states for input conditions. Input condition takes the form of one among numeric value, a set of related values, a range of values or a Boolean condition. 4.2.2 Boundary Value Analysis Most of the errors occur at the boundary values than center. So this analysis is one of testing method. Test cases verify program execution at each boundary value and are derived from output domain also. 4.2.3 Cause-Effect Graphing Techniques d. Unstructured Loops Figure 7: Concatenated Loop This type of loop should be redesigned. A typical unstructured loop is depicted in Figure 8. Used when one wants to translate a policy or procedure specified in a natural language into software s language. Input conditions and actions are listed for a module, an identifier is allocated for each one of them, cause-effect graph is created, this graph is changed into a decision table, and the rules of this table are modified to test cases. V. CONCLUSION Software testing strategies and techniques is an important for improvement and measurement of a software and software development life cycle. It represents the review of specification, design and coding. Software testing also provides an objective, independent view of software to allow the business to appreciate and understand the risk at implementation of software. Various types of software strategies used for conventional and object oriented software development. Figure 8: Unstructured Loops 686

REFERENCES International Journal of Emerging Technology and Advanced Engineering [1] Introduction to software testing available at http://www.onestoptetsing.com/introduction. [2] Software testing for Wikipedia available at http://en.wikipedia.org/wiki/grey_box_testing#grey_box_tetsing. [3] Mohd. Ehmer Khan, Different Forms of Software Testing Techniques for Finding, IJCSI International Journal of Computer Science Issues, Vol. 7, Issue 3, No 1, May 2010. [4] Guide to the Software Engineering Body of Knowledge, Swebok A project of the IEEE Computer Society Professional Practices Committee, 2004. [5] Software Engineering: A Practitioner s Approach, 6/e; Chapter 14: Software Testing Techniques, R.S. Pressman & Associates, Inc., 2005. [6] Myers, Glenford J., IBM Systems Research Institute, Lecturer in Computer Science, Polytechnic Institute of New York, The Art of Software Testing, Copyright 1979. By John Wiley & Sons, Inc. [7] White box testing from wikipedia, the free Encyclopedi. First Author is MTech student studying in VJTI, Mumbai. She has 9 year of teaching experience in Bharati Vidhyapeeth s College of Engineering, Navi Mumbai, India. Second Author is MTech student studying in VJTI, Mumbai. She has 4 year of teaching experience in Yadavrao Tasgoankar College of Engineering, Karjat, India. Third Author: Pramila M. Chawan is currently working as an Associate Professor in the Computer Technology Department of Veermata Jijabai Technological Institute (V.J.T.I.), Matunga, and Mumbai (INDIA). She received her Bachelors Degree in Computer Engineering from V.J.T.I., Mumbai University (INDIA) in 1991 & Masters Degree in Computer Engineering from V.J.T.I., Mumbai University (INDIA) in 1997. She has an academic experience of 20 years. She has taught Computer related subjects at both Undergraduate & Post Graduate levels. Her areas of interest are Software Engineering, Software Project Management, Management Information Systems, and Advanced Computer Architecture & Operating Systems. She has published 12 papers in National Conferences and 7 papers in International Conferences & Symposiums. She also has 16 International Journal publications to her credit. She has guides 35 M. Tech. projects& 85 B. Tech. projects. 687