Component Testability ASE-2003: Tutorial by Jerry Zeyu Gao By Jerry Zeyu Gao, Ph.D. San Jose State University

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Software Regression Testing Speaker: Jerry Gao Ph.D. San Jose State University URL:
Lecture # 2 : Process Models
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
Fundamentals of Testing
1 Static Testing: defect prevention SIM objectives Able to list various type of structured group examinations (manual checking) Able to statically.
Software Engineering II - Topic: Software Process Metrics and Project Metrics Instructor: Dr. Jerry Gao San Jose State University
Software Metrics II Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.
Requirements Analysis Concepts & Principles
Creating Architectural Descriptions. Outline Standardizing architectural descriptions: The IEEE has published, “Recommended Practice for Architectural.
Testing Components in the Context of a System CMSC 737 Fall 2006 Sharath Srinivas.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Introduction to Software Testing
Software Testing & Strategies
Software Test Automation and Tools Speaker: Jerry Gao Ph.D. San Jose State University URL:
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 11 System Test Design
Effective Methods for Software and Systems Integration
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Chapter 2 The process Process, Methods, and Tools
CLEANROOM SOFTWARE ENGINEERING.
-Nikhil Bhatia 28 th October What is RUP? Central Elements of RUP Project Lifecycle Phases Six Engineering Disciplines Three Supporting Disciplines.
1 Validation & Verification Chapter VALIDATION & VERIFICATION Very Difficult Very Important Conceptually distinct, but performed simultaneously.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore.
CPIS 357 Software Quality & Testing
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
VTT-STUK assessment method for safety evaluation of safety-critical computer based systems - application in BE-SECBS project.
Software Inspection A basic tool for defect removal A basic tool for defect removal Urgent need for QA and removal can be supported by inspection Urgent.
Software System Engineering: A tutorial
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 6 Slide 1 Requirements Engineering Processes l Processes used to discover, analyse and.
Software Component Technology and Component Tracing CSC532 Presentation Developed & Presented by Feifei Xu.
©Ian Sommerville 2000, Mejia-Alvarez 2009 Slide 1 Software Processes l Coherent sets of activities for specifying, designing, implementing and testing.
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
Ch6: Software Verification. 1 Decision table based testing  Applicability:  Spec. is described by a decision table.  Tables describe:  How combinations.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
Systems Design Approaches The Waterfall vs. Iterative Methodologies.
Testing Workflow In the Unified Process and Agile/Scrum processes.
Software Engineering Principles Principles form the basis of methods, techniques, methodologies and tools Principles form the basis of methods, techniques,
Lecture 7: Requirements Engineering
Test Drivers and Stubs More Unit Testing Test Drivers and Stubs CEN 5076 Class 11 – 11/14.
Today’s Agenda  HW #1  Finish Introduction  Input Space Partitioning Software Testing and Maintenance 1.
Design Concepts and Principles Instructor: Dr. Jerry Gao.
Safety Critical Systems 5 Testing T Safety Critical Systems.
Component Validation Methods ASE-2003: Tutorial by Jerry Zeyu Gao By Jerry Zeyu Gao, Ph.D. San Jose State University
Cmpe 589 Spring 2006 Lecture 2. Software Engineering Definition –A strategy for producing high quality software.
Chapter 8 Lecture 1 Software Testing. Program testing Testing is intended to show that a program does what it is intended to do and to discover program.
Chapter 6: THE EIGHT STEP PROCESS FOCUS: This chapter provides a description of the application of customer-driven project management.
Software Maintenance Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.
1 Software Engineering: A Practitioner’s Approach, 7/e Chapter 2 Process: A Generic View Software Engineering: A Practitioner’s Approach, 7/e Chapter 2.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Lecture 13.  Failure mode: when team understands requirements but is unable to meet them.  To ensure that you are building the right system Continually.
CPSC 871 John D. McGregor Module 8 Session 1 Testing.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Dynamic Testing.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
SOFTWARE TESTING AND QUALITY ASSURANCE. Software Testing.
CS223: Software Engineering Lecture 25: Software Testing.
Testing Integral part of the software development process.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVIII. Software Testing.
Testability.
Essential Needs of Software Test Automation
Regression Testing with its types
Test Automation CS 4501 / 6501 Software Testing
Introduction to Software Testing
Fundamental Test Process
Test Automation CS 4501 / 6501 Software Testing
Software Test Automation and Tools
Measurement What is it and why do it? 2/23/2019
Presentation transcript:

Component Testability ASE-2003: Tutorial by Jerry Zeyu Gao By Jerry Zeyu Gao, Ph.D. San Jose State University URL:/ Oct. 6, 2003 Testing Component-Based Software – Issues, Challenges, Solutions

ASE-2003: Tutorial by Jerry Zeyu Gao Testing Component-Based Software Presentation Outline Basic concepts of software testability Understanding component testability –Component understandability –Component observability –Component traceability –Component controllability –Test support capability Design for component testability –Understanding different approaches to increasing component testability –Building BIT components –Building testable components Verification and evaluation of component testability Software testability measurement Component Testability

ASE-2003: Tutorial by Jerry Zeyu Gao Basic Concepts of Software Testability Testability is a very important quality indicator of software and its components since its measurement leads to the prospect of facilitating and improving a software test process. “The degree to which a system or component facilitate the establishment of test criteria and the performance of tests to determine whether those criteria have been met; the degree to which a requirement is stated in terms that permit the establishment of test criteria and performance of tests to determine whether those criteria have been met.” (by IEEE Standard) Software testability depends on our answer to the following questions:  Do we construct a system and its components in a way that facilitates the establishment of test criteria and performance of tests based on the criteria?  Do we provide component and system requirements that are clear enough to allow testers to define clear and reachable test criteria and perform tests to see whether they have been met? Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Basic Concepts of Software Testability Poor testability of components and programs indicate:  the poor quality of software and components  the ineffective test process Although verifying and measuring software testability after implementation is useful for quality control, it is little too late to increase and enhance the testability of software and its components. In a practice view, we need to focus on the two areas:  How to increase software testability by constructing highly testable components and systems?  How to analyze, control, and measure the testability of software components in all phases of a software development process? Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Different Tasks and Activities Relating Testability Requirements Analysis:  Clearly define testable and measurable requirements  Provide well-defined facilitating requirements for software testing  Review and evaluate system/component requirements to make sure they are testable and measurable Software Design:  Conduct design for testability of software and components, i.e. come out architecture model and interfaces increasing testability.  Define design patterns, standards, and framework for testable components  Review and evaluate software design concerning software testability Implementation:  Implement testable components and built-in tests  Generate software testing facilities and reusable framework  Review program/component code based on well-defined testability standards Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Different Tasks and Activities Relating Testability Testing:  Define achievable component test criteria and high quality tests/scripts  Develop, set-up, and use test beds and facilities for components  Perform component tests and monitor coverage based on defined criteria  Verify, evaluate, and measure component testability Maintenance:  Update and review test criteria and tests based on component changes  Maintain testable components and built-in tests  Maintain component test framework and test beds  Evaluate, verify, and measure the testability of components Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Understanding Component Testability What is software component testability? - R. S. Freedman defined component testability in a function domain by considering two factors: (a)Component Observability and (b) Component Controllability - R. V. Binder discussed testability of object-oriented programs by considering six factors: (A) Representation, (B) Implementation, (C) Built-in Test (D) Test Suite, (E) Test Support Environment, and (F) Process Capability Component testability is two-fold: - It refers to the degree to which a component is constructed to facilitate the establishment of component test criteria and the performance of tests to determine whether those criteria have been met. - It refers to the degree to which testable and measurable component requirements are clearly given to allow the establishment of test criteria and performance of tests. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Understanding Component Testability Software component testability depends on the following five factors:  Component understandability  Component observability  Component traceability  Component controllability  Component testing support capability Component Testability Component Understandability Component Observerability Component Controllability Component Test Support Capability Component Traceability Studying component testability focuses on two aspects: 1.Studying how to construct testable components, including component development methods, guidelines, principles, and standards 2.Studying how to verify and measure component testability based on established test criteria Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Component Understandability Component understandability depends on the following two factors:  Availability of component artifacts for component users, such as component function specifications, interfaces, programs, testing doc.  Availability of component artifacts for component developers, such as Component user manual and reference documents.  Understandability of component artifacts. Component observability indicates how easy it is to observe a program based on its operation behaviors, input parameter values, and actual outputs for a test case. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Component Traceability Component traceability depends on the following five factors:  Component error traceability  Component state behavior traceability  Component event traceability  Component function/operation traceability  Component performance traceability Component Trace State TraceOperation TracePerformance TraceError Trace GUI Event Trace Event Trace Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Component Controllability Component controllability depends on the following five factors:  Component execution control  Component environment control  Component state-based behavior control  Component test control through interfaces  Component functional feature control Component Controllability Component Execution Control Component Environment Control Component Test Control through Interfaces Component Functional Feature Control Component State-Based Behavior Control Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Component Test Support Capability Component Test Management Capability Component Test Suite Support Capability Component Test Coverage Analysis Capability Component Test Generation Capability Component White-Box Test Generation Component Black-Box Test Generation Test Coverage Criteria and Standards Component Test Coverage Analysis Tools Component Test Scripting Capability Component Test Harness Support Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Component Testability Issues and Challenges Component testability issues in CBSE:  How to construct components with high testability? (in other words, how to create testable software components?)  How to increase component testability in a component reuse process?  How to check component testability during a component development process?  How to measure component testability in a component development process? Challenges in studying component testability:  Creating component testability models  Finding systematic methods to create testable components  Developing systematic methods to verify component testability  Defining measurement methods and metrics for component testability Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Design for Component Testability Design for component testability refers to all engineering activities to enhance component testability for software components in a component development process. Challenges in building testable components:  How to specify testability requirements for components?  How to construct components to achieve high testability? (including construction approaches, component architecture, test interface, ….)  How to support test automation for testable components?  How to verify generated component testability in a systematic solution?  How to measure and analyze the testability of components during a component development process in a systematic approach? Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Three Common Approaches Three common approaches to increase component testability: -Method #1: Framework-based testing facility  Creating well-defined framework (such as a class library) is developed to allow engineers to add program test-support code into components according to the provided application interface of a component test framework. -Method #2: Build-in tests  Adding test-support code and built-in tests inside a software component as its parts to make it testable. -Method #3: Systematic component wrapping for testing  Using a systematic way to convert a software component into a testable component by wrapping it with the program code that facilitates software testing. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Built-in Test Components Definition: According to Y. Wang et al, a built-in test component is a special type of software component in which special member functions are included as its source code for enhancing software testability and maintainability. Major features: Built-in test components are able to operate in two modes: –a) normal mode – a component behaviors as its specified functions. –b) maintenance mode – its internal built-in tests can be activated by interacting a tester (or user). Built-in tests as a part of a component. (see an example) Major limits: Only limited tests can be built-in tests due to component complexity It is costly to change and maintain built-in tests during a component development process. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Comparison of Three Approaches Different PerspectivesFramework-Based Testing Facility Built-in TestsSystematic Component Wrapping for Testing Programming OverheadLowHighVery Low Testing Code Separated from Source Code No Yes Software Tests inside Components NoYesNo Test Change Impact on Components NoHighNo Software Change Impact on Component Testing Interfaces NoYesNo Component ComplexityLowVery HighHigh Usage FlexibilityHighLow Applicable ComponentsIn-house components and newly developed components In-house components and newly developed component In-house components and COTS as well as newly constructed components Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao What Is A Testable Component? “A testable bean is a testable software component that is not only deployable and executable, but is also testable with the support of standardized components test facilities.” (by Jerry Zeyu Gao et al.) The basic requirements of a testable bean: Requirement #1: A testable bean should be deployable and executable. A JavaBean is a typical example. Requirement #2: A testable bean must be traceable by supporting basic component tracking capability that enables a user to monitor and track its behaviors. Requirement #3: A testable bean must provide a consistent, well-defined, and built-in interface, called component test interface, to support external interactions for software testing. Requirement #4: A testable bean must include built-in program code to facilitate component testing by interacting with the two provided test interfaces to select tests, set up and run tests, and check test results. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Why Do We Need Testable Components? The major goal of introducing testable components is to find a new way to develop software components which are easily to be observed, traced, tested, deployed, and executed. The major advantages of testable components: Increasing component testability by enhancing component understandability, observability, controllability, and test support capability. Standardizing component test interfaces and interaction protocols between components and test management systems and test suite environments. Reducing the effort of setting up component test beds by providing a generic plug- in-and-test environment to support component testing and evaluation. Providing the basic support for a systematic approach to automating the derivation of component test drivers and stubs. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Principles of Building Testable Components The essential needs in constructing testable components are: Well-defined component models concerning test support Consistent test interfaces between components and external test tools and facilities Effective ways and mechanisms to construct testable components The basic principles of building testable components: It is essential to minimize the development efforts and program overheads when we increase component testability by providing systematic mechanisms and reusable facilities. It is important to standardize component test interfaces for testable beans so that they can be tested in a reusable test bed using a plug-in-and-play approach. It is always a good idea to separate the component functional code from the added and built-in code that facilitates component testing and maintenance. Component TestabilityTesting Component-Based Software

Component F1 Fn Component Test Interface (a) A Software Component(b) A Built-in Test Component (c) A Testable Bean Component F1 Fn Component Test Interface (d) A Fully Testable Component Component Test Cases Component Tracking Interface Component Tracking Interface Built-in Component Test Bed Built-in Component Test Code Built-in Component Tracking Code Component Fn Built-in Test F1 TF1 TFm F1 Fn ASE-2003: Tutorial by Jerry Zeyu Gao Different Architecture Models for Testable Components Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Maturity Levels for Testability Evaluating the maturity levels of a test process concerning testability: Level #1- Initial – At this level, component developers and testers use an ad hoc approach to enhance component testability in a component development process. Level #2- Standardized – At this level, component testability requirements, design methods, implementation mechanisms, and verification criteria are defined as standards. Level #3- Systematic – At this level, a well-defined component development and test process and systematic solutions are used to increase component testability at all engineering phases. Level #4-Masurable – At this level, component testability can be evaluated and measured using systematic solutions and tools in all component development phases. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Verification of Component Testability Verification of component testability:  Check component testability of software components using well-defined verification means during a component development process. Static verification approach – Using various verification methods to check the generated component artifacts in all phases, including component requirements, interface specifications, design logic, implementation, and test cases and results.  This enhances component testability by discovering testability issues in all phases of a component development process Statistic verification approach – Using statistical methods to analyze and estimate component testability by examining how a given component will behave when it contains faults.  This suggests the testing intensity or testing difficulty in discovering a fault at a specific location.  This suggests the number of tests necessary to gain quality confident. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Verification of Component Testability Static verification approach –  Component specification phase: Checking component requirements are clearly specified so that they can be tested and measured for a given test criteria. How to specify them? How to verify them for testability?  Component design phase: Checking component design for testability -> focusing how the current component design to meet the given testability requirements, including component model, architecture, interfaces for testing, test facility design How to verify design artifacts for component testability?  Component implementation phase: Checking if component design for testability has been properly implemented  Component testing phase: Checking component tests based on the given test criteria Measuring component testability based on a component testability model Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Verification of Component Testability Statistical verification approach –  Use a statistical approach to examine how a given program behave when it contains a fault. Example: Jeffrey Voas proposed a verification approach (sensitivity analysis) to check program testability. Its major objective is to predict the probability of a software failure occurring if the particular software contains a fault for a given set of test set for black-box testing. Jerrfrey Voas’ method involves three estimations at each location:  Execution probability  Infection probability  Propagation probability Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Measurement of Software Testability What is software testability measurement?  Software testability measurement refers to the activities and methods that study, analyze, and measure software testability during a product development cycle. How to measure software testability? Three types of measurement methods: -Program-based measurement methods for software testability Example, J. –C. Lin’s program-based method to measure program testability by considering the single faults in a program. -Model-based measurement methods for software testability Example, C. Robach and Y. Le Traon use the data flow model to measure software testability. Similarly, J.-C. Lin and S.-W. Lin’s approach. -Dependability assessment methods for software testability Example, A. Bertolino and L. Strigni’s black-box approach which measures software testability based on the dependency relationships between inputs and corresponding outputs. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Measurement of Software Testability Program-based measurement methods for software testability Example, J. –C. Lin’s program-based method to measure program testability by considering the single faults in a program. The basic idea of this approach is similar to software mutation testing. To compute the testability of a software at a specific location based on a single failure assumption: -A single fault is instrumented into the program at a specific location. -The newly instrumented program is compiled and executed with an assumed input distribution. -Three basic techniques (execution, infection, and propagation estimation) are used to compute the probability of failure that would occur when that location has a fault. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Measurement of Software Testability Model-based measurement methods for software testability Example, C. Robach and Y. Le Traon use the data flow model to measure software testability. Similarly, J.-C. Lin and S.-W. Lin’s approach. -> A white-box based approach for testability measurement Three steps: 1.Normalizing a program before the testability measurement using a systematic tool. -Structure normalization and block normalization 2.Identifying the testable elements of the target program based on its normalized data flow model. -Including number of non-comment lines, nodes, edges, p-uses, defs, uses, d-u paths, and dominating paths. 3.Measuring the program testability based on data flow testing criteria. -Including ALL-NODES, ALL-EDGES, ALL-P-USES, ALL-DEFS, ALL-USES, ALL-DU-PAIRS and ALL-DOMINATING PATH. Component TestabilityTesting Component-Based Software

ASE-2003: Tutorial by Jerry Zeyu Gao Measurement of Software Testability Dependability assessment methods for software testability Example, A. Bertolino and L. Strigni’s black-box approach which measures software testability based on the dependency relationships between inputs and corresponding outputs. -A black-box approach for testability measurement -Testability is computed based on the probability of a test of the program based on a given input setting is rejected by the program due to its faculty. The basic approach consists of the following steps: -Perform an oracle in a manual (or systematic) mode to decide whether a given program behave correctly on a given test. -The oracle decides the test outcome by analyzing the behavior of the program against its specification. -Observes the input and the output of each test against the expected output, and looks for failures. Component TestabilityTesting Component-Based Software