1 Implementation Xiaojun Qi. 2 Choice of Programming Language The language is usually specified in the contract But what if the contract specifies that.

Slides:



Advertisements
Similar presentations
Software Testing. Quality is Hard to Pin Down Concise, clear definition is elusive Not easily quantifiable Many things to many people You'll know it when.
Advertisements

Slide 15.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Slide 14A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Implementation and Integration1 Concepts and practices.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Integration testing Satish Mishra
Programming Creating programs that run on your PC
Unit 241 Integration Phase  The objective of this section is to introduce how the software product is realized from a set of programs, program units or.
Unit 251 Implementation and Integration Implementation Unit Testing Integration Integration Approaches.
Object-Oriented Analysis and Design Lecture 10 Implementation (from Schach, “O-O and Classical Software Engineering”)
Software Testing and Quality Assurance
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Illinois Institute of Technology
Chapter 1 Principles of Programming and Software Engineering.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Quality Assurance
Software System Integration
BY RAJESWARI S SOFTWARE TESTING. INTRODUCTION Software testing is the process of testing the software product. Effective software testing will contribute.
Software Life Cycle Model
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
System/Software Testing
Implementation & Integration Phase Implementation, then integration: Implementation, then integration:  Each module is implemented by member of programmer.
Slide 15.1 Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented and Classical Software Engineering Eighth Edition,
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Software Testing.
Prof. Mohamed Batouche Software Testing.
Chapter 13: Implementation Phase 13.3 Good Programming Practice 13.6 Module Test Case Selection 13.7 Black-Box Module-Testing Techniques 13.8 Glass-Box.
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.
CSE 219 Computer Science III Testing. Testing vs. Debugging Testing: Create and use scenarios which reveal incorrect behaviors –Design of test cases:
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Software Testing Testing types Testing strategy Testing principles.
Slide 1 Construction (Testing) Chapter 15 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon.
System Test Methods TESTTEME The Test Challenge Bottom Up Testing Strategy Integration Test System Test Types of Testing Unit Test = Code-based Testing.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Software Construction Lecture 18 Software Testing.
Historical Aspects Origin of software engineering –NATO study group coined the term in 1967 Software crisis –Low quality, schedule delay, and cost overrun.
Berrached::CS3320::Ch131 Implementation Phase Chapter 13 Classical & Object-Oriented Software Engineering by Stephen R. Schach.
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
 Test Plan  Testing strategies ◦ Unit testing ◦ Integration testing ◦ Product testing ◦ Acceptance testing  Test case selection  Testing Techniques.
The Software Development Process
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Integration testing Integrate two or more module.i.e. communicate between the modules. Follow a white box testing (Testing the code)
Software Engineering Issues Software Engineering Concepts System Specifications Procedural Design Object-Oriented Design System Testing.
CS451 Software Implementation and Integration Yugi Lee STB #555 (816) Note: This lecture was designed.
IMPLEMENTATION. Implementation Process of translating the detailed design into code Real-life products are generally too large to be implemented by a.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
CS 325: Software Engineering February 16, 2016 Designing a Design Class Diagram Design Class Diagrams DCD: Restaurant Example DCD: ATM Example Software.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Software Engineering Zhang Shuang
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Defect testing Testing programs to establish the presence of system defects.
Software Testing.
Rekayasa Perangkat Lunak Part-13
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Verification and Validation Unit Testing
Software life cycle models
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
IMPLEMENTATION AND INTEGRATION PHASE
Software Testing “If you can’t test it, you can’t design it”
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presentation transcript:

1 Implementation Xiaojun Qi

2 Choice of Programming Language The language is usually specified in the contract But what if the contract specifies that –The product is to be implemented in the “most suitable” programming language What language should be chosen? How to choose a programming language –Cost–benefit analysis –Compute costs and benefits of all relevant languages

3 Choice of Programming Language (Cont.) Which is the most appropriate object- oriented language? –C++ is (unfortunately) C-like –Thus, every classical C program is automatically a C++ program –Java enforces the object-oriented paradigm –Training in the object-oriented paradigm is essential before adopting any object-oriented language What about choosing a fourth generation language (4GL)?

4 Fourth Generation Languages First generation languages: Machine languages Second generation languages: Assemblers Third generation languages: High-level languages (COBOL, FORTRAN, C++, Java) Fourth generation languages (4GLs) –One 3GL statement is equivalent to 5–10 assembler statements –Each 4GL statement was intended to be equivalent to 30 or even 50 assembler statements

5 Fourth Generation Languages (Cont.) It was hoped that 4GLs would –Speed up application-building –Result in applications that are easy to build and quick to change Reducing maintenance costs –Simplify debugging –Make languages user friendly Leading to end-user programming Achievable if 4GL is a user friendly, very high-level language

6 Actual Experiences with 4GLs (Cont.) Attitudes of 43 organizations to 4GLs –Use of 4GL reduced users’ frustrations –Quicker response from data-processing department –4GLs are slow and inefficient, on average –Overall, 28 organizations using 4GL for over 3 years felt that the benefits outweighed the costs

7 Fourth Generation Languages (Cont.) Market share –No one 4GL dominates the software market –There are literally hundreds of 4GLs –Dozens with sizable user groups –Oracle, DB2, and PowerBuilder are extremely popular Reason –No one 4GL has all the necessary features Conclusion –Care has to be taken in selecting the appropriate 4GL

8 Good Programming Practice Use of consistent and meaningful variable names –“Meaningful” to future maintenance programmers –“Consistent” to aid future maintenance programmers Use comments whenever the code is written in a non-obvious way, or makes use of some subtle aspect of the language

9 Good Programming Practice (Cont.) Use of Parameters (i.e., apparent constants) –Use const statements (C++), or –Use public static final statements (Java) Code Layout for Increased Readability: Use indentation and plenty of blank lines Nested if Statements –Rule of thumb: if statements nested to a depth of greater than three should be avoided as poor programming practice

10 Coding Standards No standard can ever be universally applicable Standard must be checkable by machine Examples of good coding standards –“ Nesting of if statements should not exceed a depth of 3, except with prior approval from the team leader” –“Modules should consist of between 35 and 50 statements, except with prior approval from the team leader” –“Use of gotos should be avoided. However, with prior approval from the team leader, a forward goto may be used for error handling”

11 Top-down Integration If code artifact mAbove sends a message to artifact mBelow, then mAbove is implemented and integrated before mBelow One possible top-down ordering is –a,b,c,d,e,f,g, h,i,j,k,l,m Another possible top-down ordering is a [a]b,e,h [a] c,d,f,i [a,d]g,j,k,l,m Figure 14.6

12 Top-down Integration: Advantages Advantage 1: Fault isolation –A previously successful test case fails when mNew is added to what has been tested so far The fault must lie in mNew or the interface(s) between mNew and the rest of the product Advantage 2: Stubs (A stub is an empty artifact. It should return values corresponding to preplanned test cases.) are not wasted –Each stub is expanded into the corresponding complete artifact at the appropriate step

13 Top-down Integration: Advantages (Cont.) Advantage 3: Major design flaws show up early The logic artifacts are developed before the operational artifacts –Logic artifacts include the decision-making flow of control In the example, artifacts a,b,c,d,g,j –Operational artifacts perform the actual operations of the product In the example, artifacts e,f,h,i,k,l,m

14 Top-down Integration: Problems 1.Reusable artifacts are not properly tested 2.Lower level (operational) artifacts are not tested frequently 3.The situation is aggravated if the product is well designed -- Defensive programming: The type of design where the calling artifact includes a safety check of this kind.

15 Bottom-up Integration If code artifact mAbove calls code artifact mBelow, then mBelow is implemented and integrated before mAbove One possible bottom-up ordering is l,m,h,i,j,k,e, f,g,b,c,d,a Another possible bottom-up ordering is h,e,b i,f,c,d l,m,j,k,g[d] a[b,c,d] Figure 14.6

16 Bottom-up Integration: Advantages Advantage 1 –Operational artifacts are thoroughly tested Advantage 2 –Operational artifacts are tested with drivers (A code artifact that calls the artifact under test one or more times, if possible checking the values returned by such an artifact under test). Advantage 3 –Fault isolation

17 Bottom-up Integration: Problems and Solutions Problem –Major design faults are detected late Solution –Combine top-down and bottom-up strategies making use of their strengths and minimizing their weaknesses

18 Sandwich Integration Logic artifacts are integrated top-down Operational artifacts are integrated bottom-up Finally, the interfaces between the two groups are tested Figure 14.7

19 Sandwich Integration: Advantages Advantage 1 –Major design faults are caught early Advantage 2 –Operational artifacts are thoroughly tested –They may be reused with confidence Advantage 3 –There is fault isolation at all times

20 Summary Figure 14.8

21 Integration of Object-Oriented Products Object-oriented implementation and integration –Almost always sandwich implementation and integration –Objects are integrated bottom-up –Other artifacts are integrated top-down

22 Black-Box Unit-testing Techniques Neither exhaustive testing to specifications nor exhaustive testing to code is feasible The art of testing: –Select a small, manageable set of test cases to maximize the chances of detecting a fault, while minimizing the chances of wasting a test case Every test case must detect a previously undetected fault One such black-box technique is equivalence testing combined with boundary value analysis.

23 Glass-Box Unit-testing Techniques We will examine –Statement coverage: Running a set of test cases in which every statement is executed at least once –Branch coverage: Running a set of test cases in which every branch is executed at least once (as well as all statements) –Path coverage: Running a set of test cases in which every path is executed at least once (as well as all statements) –Linear code sequences: Identify the set of points L from which control flow may jump, plus entry and exit points –All-definition-use path coverage: Identify all paths from the definition of a variable to the use of that definition

24 Management Aspects of Unit Testing We need to know when to stop testing A number of different techniques can be used –Cost–benefit analysis –Risk analysis –Statistical techniques

25 Integration Testing The testing of each new code artifact when it is added to what has already been tested Special issues can arise when testing graphical user interfaces — see next slide

26 Product Testing Product testing for COTS software –Alpha, beta testing Product testing for custom software –The SQA group must ensure that the product passes the acceptance test –Failing an acceptance test has bad consequences for the development organization

27 Product Testing for Custom Software The SQA team must try to approximate the acceptance test –Black box test cases for the product as a whole –Robustness of product as a whole –All constraints must be checked –All documentation must be Checked for correctness and conformity with standards Verified against the current version of the product The product (code plus documentation) is now handed over to the client organization for acceptance testing

28 Acceptance Testing The client determines whether the product satisfies its specifications Acceptance testing is performed by –The client organization, or –The SQA team in the presence of client representatives, or –An independent SQA team hired by the client The four major components of acceptance testing are: Correctness, Robustness, Performance, and Documentation These are precisely what was tested by the developer during product testing

29 Acceptance Testing (Cont.) The key difference between product testing and acceptance testing is –Acceptance testing is performed on actual data –Product testing is preformed on test data, which can never be real, by definition