SOFTWARE CONSTRUCTION AND TESTING Software Construction

682 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
682
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
26
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SOFTWARE CONSTRUCTION AND TESTING Software Construction

  1. 1. SOFTWARE CONSTRUCTION AND TESTING
  2. 2. Software Construction & Testing <ul><li>What is software construction? </li></ul><ul><li>What is software testing? </li></ul><ul><li>How important are construction & testing? </li></ul><ul><li>What are some of the “critical success factors” for construction & testing? </li></ul><ul><li>Who should be involved in the construction & testing activities? </li></ul>
  3. 3. Software Construction & Testing <ul><li>Labor intensive activity </li></ul><ul><li>Tools are required </li></ul><ul><li>Blueprints are essential </li></ul><ul><li>Mistakes can be deadly </li></ul><ul><li>Weariness and Stress are common </li></ul>
  4. 4. Software Construction & Testing - A Large Project from LORAL (formerly IBM Federal Systems Div) * <ul><li>Flight Software in Space Shuttle 500 KLOC </li></ul><ul><li>Software Production Facility Simulator 1,700 KLOC </li></ul><ul><li>Mission & Payload Control Centers 4,000 KLOC </li></ul><ul><li>Launch Processing System 2,500 KLOC </li></ul><ul><li>Space Lab (prototype version) 800 KLOC </li></ul><ul><li>Total: 9,500 KLOC </li></ul><ul><li>New Version every 4-8 months </li></ul><ul><li>10-53 KLOC changes each time </li></ul>* circa 1994
  5. 5. Software Construction & Testing - A Large Project from Inland Steel Industries, Inc. * <ul><li>$4.6B Revenue (#6) </li></ul><ul><li>$74.4M I.S. Budget </li></ul><ul><li>466 I.S. Employees </li></ul><ul><li>Order Fulfillment Sys </li></ul><ul><li>27 Integrated Applics. </li></ul><ul><li>18 Reeng bus. process </li></ul><ul><li>Almost 4 years: </li></ul><ul><ul><li>1993 - Feas & Analysis </li></ul></ul><ul><ul><li>‘ 94-’96 Dev, Imple. in 3 phases </li></ul></ul><ul><li>400 Person-years with 200 technologists </li></ul><ul><li>Replaced 30-year old sys </li></ul><ul><li>65,000 Function Points </li></ul><ul><li>7 Million LOC </li></ul><ul><li>Cost: $37M; Save: $25M (one-time); $9M Annually </li></ul><ul><li>Developed On-Time and Within Budget - aka “A Miracle” </li></ul>* Caldwell, Bruce, “Taming the Beast”, InformationWeek, 3/10/97, pp 38-48.
  6. 6. Software Construction & Testing - Software Design Principles <ul><li>Software should work correctly </li></ul><ul><li>Software must conform to requirements specification </li></ul><ul><li>Software must be reliable over time and data </li></ul><ul><li>Software must be evolutionary </li></ul><ul><li>Software must be easy to use </li></ul><ul><li>Software should be easy to test & implement </li></ul><ul><li>Software should use computer resources efficiently </li></ul>
  7. 7. Verification and Validation* <ul><li>Verification: The process of evaluating a system or component to determine whether the products of a given phase satisfy the conditions imposed at the start of that phase. (Mainly a paper-based activity that requires you to confirm that each stage of the development conforms to the requirements defined in the previous stage.) </li></ul><ul><li>Validation: The process of evaluating a system or component during or at the end of the development process to determine whether it satisfies specified requirements. (Mainly a confirmation that the implemented system/component actually works to specification.) </li></ul>* IEEE Standard Glossary of Software Engineering Terminology, 1994
  8. 8. Hierarchical View of Software Construction Statement (sequence, selection, iteration) EXAMPLES X = X + 1 MOVE ACCT TO NEWACCT IF X = 25... DO WHILE ... (one or more statements combine to form a module) Module (paragraph, procedure, subroutine) COMPUTE-NET-PAY SALESTAX(AMT,TOTAL) Program (one or more modules combine to form a program) INVOICE PROGRAM ORDER ENTRY PROGRAM ELEVATOR PROGRAM Sub-System or System (one or more programs combine to form a sub-system or system) H P P D S (software, hardware, people, procedures, data)
  9. 9. Hierarchical View of Object-Oriented Software Construction Statement (sequence, selection, iteration) (one or more statements combine to form a service) Service (one or more services belong to a Class or Class-with-Objects) Sub-System or System (one or more Class-with-Objects combine to form a sub-system or system) H P P D S (software, hardware, people, procedures, data) Class with Objects Attributes Services
  10. 10. <ul><li>TOP-DOWN </li></ul><ul><li>BOTTOM-UP </li></ul><ul><li>MIDDLE-OUT </li></ul>Software Construction Strategies <ul><li>High-level to low-level; user interface to detail logic </li></ul><ul><li>Reverse of the above </li></ul><ul><li>Some of both </li></ul>These strategies are discussed in more detail in the Testing Section
  11. 11. Two Software Evaluation Metrics Cohesion Coupling
  12. 12. COHESION: The measure of strength of the interrelatedness of statements within a module High (best) Low (worst) <ul><li>Functional </li></ul><ul><li>Informational </li></ul><ul><li>Communicational </li></ul><ul><li>Procedural </li></ul><ul><li>Temporal </li></ul><ul><li>Logical </li></ul><ul><li>Coincidental </li></ul>
  13. 13. Cohesion* * adapted from: Software Engineering, Pressman, R. S., McGraw Hill, 1987 “ Scatter-brained” module “ Single-minded” module low (“worst”) high (“best”) Coincidental Logical Temporal ..... Informational Functional
  14. 14. COHESION: The measure of strength of the interrelatedness of statements within a module High (best) Low (worst) <ul><li>Functional - one action or goal </li></ul><ul><li>Informational - multiple independent actions on </li></ul><ul><li>the same data </li></ul><ul><li>Communicational - series of steps on same data </li></ul><ul><li>Procedural - series of steps for an action </li></ul><ul><li>Temporal - series of related actions related in time </li></ul><ul><li>Logical - series of related actions </li></ul><ul><li>Coincidental - multiple, unrelated actions </li></ul>
  15. 15. Cohesion - examples - 1 of 3 <ul><li>Coincidental cohesion module </li></ul>Logic to produce Payroll report Logic to produce Production report Logic to produce Sales report Logic to check e-mail etc... One module
  16. 16. Cohesion - examples - 2 of 3 <ul><li>With (x) = Coincidental cohesion </li></ul><ul><li>Without (x) = Logical cohesion </li></ul>Display date & time on screen Prompt user for student id number Look up student id number in STUDENT table IF found: Prompt user for password Validate password Process course seat registration request Check to see if user has email waiting (x) Check to see if user’s health record is up-to-date (x) ELSE IF not found: do error processing END
  17. 17. Cohesion - examples - 3 of 3 <ul><li>Functionally cohesive modules </li></ul>Logic to display date Logic to display time Logic to prompt user for student id Logic to validate student id Logic to handle error condition Logic to prompt user for password Logic to ..... etc. Each of these is a separate module
  18. 18. COUPLING: The measure of strength of the connection between modules High (worst) Low (best) <ul><li>Content </li></ul><ul><li>Common </li></ul><ul><li>Control </li></ul><ul><li>Stamp </li></ul><ul><li>Data </li></ul><ul><li>No Coupling </li></ul>
  19. 19. Coupling* * adapted from: Software Engineering, Pressman, R. S., McGraw Hill, 1987 “ highly independent” module “ highly dependent” module low (“best”) high (“worst”) No coupling Data Stamp Control Common Content
  20. 20. COUPLING: The measure of strength of the connection between modules High (worst) Low (best) <ul><li>Content - direct branch into middle of module </li></ul><ul><li>Common - global reference of variables </li></ul><ul><li>Control - control element being passed </li></ul><ul><li>Stamp - pass an entire data structure </li></ul><ul><li>Data - variables or fields only being passed </li></ul><ul><li>No Coupling </li></ul>
  21. 21. Software Testing Principles <ul><li>User-accepted test plan </li></ul><ul><li>General testing strategy/philosophy: </li></ul><ul><ul><ul><li>Cause and discover errors </li></ul></ul></ul><ul><ul><ul><li>Rules of reasonableness should prevail </li></ul></ul></ul><ul><li>Testing Strategies: </li></ul><ul><ul><ul><li>Top-Down </li></ul></ul></ul><ul><ul><ul><li>Bottom-Up </li></ul></ul></ul><ul><ul><ul><li>Middle-out </li></ul></ul></ul><ul><ul><ul><li>Hybrid </li></ul></ul></ul><ul><ul><ul><li>Black box </li></ul></ul></ul><ul><ul><ul><li>White box </li></ul></ul></ul><ul><ul><ul><li>Alpha </li></ul></ul></ul><ul><ul><ul><li>Beta </li></ul></ul></ul>
  22. 22. Software Testing Methodology Showing Feedback/Fallback Loop User Acceptance Testing System Testing Function Testing Integration Testing Unit Testing
  23. 23. Module A Stub B Stub C Stub D Module A Module B Stub C Stub D Stub E Stub F Module A Module B Stub C Stub D Module E Stub F Stub Testing (shaded module is the current one being tested)
  24. 24. Module A Stub B Stub C Stub D Module A Do Stub B Do Stub C Do Stub D End Module A Stub B Display “ now in Stub B” Return Stub C Display “ now in Stub C” Return Stub D Display “ now in Stub D” Return Calling Stub Modules During Construction & Testing
  25. 25. Systems Analysis Systems Design Software Design Program Design Module Design User Specification System Specification Software Specification Program Specification Module Specification Acceptance Testing System Testing Function Testing Integration Testing Unit Testing Programming Framework for Information Systems Testing
  26. 26. Validation and Verification <ul><li>Define the “Problem” </li></ul><ul><li>Solve the “Problem” </li></ul><ul><li>Prove it </li></ul><ul><ul><li>Validation - process done by s/w developer </li></ul></ul><ul><ul><li>Verification - process done by customer </li></ul></ul>1 of 2
  27. 27. Validation and Verification 2 of 2 Need(s) Design and Implement Component Test Sub-system Test Sub-system Requirements System Requirements Component Requirements System Test Delivered System
  28. 28. That’s all folks!

×