1 / 50

Comprehensive Guide to Software Testing and Maintenance

Explore advanced testing techniques, software maintenance, importance of maintenance, and key maintenance frameworks in software development. Understand Lehan's Laws and types of software changes.

harmonyd
Télécharger la présentation

Comprehensive Guide to Software Testing and Maintenance

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Today’s Agenda • HW #6 • Software Maintenance Software Testing and Maintenance 1

  2. Quick Review • What is the fundamental difference between software development and maintenance? Software Testing and Maintenance 2

  3. Advanced Testing Techniques • Automatic test data generation • Symbolic/concolic execution, constraint solving • Testing of interactive systems, e.g. GUI, web applications • How to generate test sequences? • Object-oriented testing • How to take into account OO features like inheritance and polymorphism? • Concurrency/real-time testing • How to control non-deterministic behavior? How to verify synchronization/timing requirements? Software Testing and Maintenance 3

  4. Software Maintenance • Introduction • Process Models • Program Understanding • Configuration Management • Management Issues • Conclusion Software Testing and Maintenance 4

  5. Software Maintenance • Management and control of changes to a software product after delivery • Bug fix, new features, environment adaptation, performance improvement • Often accounts for 40-70% of the cost of the entire life-cycle of a software product • The more successful a software product is, the more time it spends on maintenance Software Testing and Maintenance 5

  6. Software vs Programs Software Testing and Maintenance 6

  7. Maintenance vs Development • Maintenance must work within the parameters and constraints of an existing system • The addition of a new room to an existing building can be more costly than adding the room in the first place • An existing system must be understood prior to a change to the system • How to accommodate the change? • What is the potential ripple effect? • What skills and knowledge are required? Software Testing and Maintenance 7

  8. Why Maintenance? • To provide continuity of service • Bug fixing, recover from failure, accommodating changes in the environment • To support mandatory upgrades • Government regulations, maintaining competitive edges • To support user requests for improvements • New features, performance improvements, customization for new users • To facilitate future maintenance work • Re-factoring, document updating Software Testing and Maintenance 8

  9. A Maintenance Framework • User Requirements • Error correction, new features • Environment • Operational: Innovations in hardware and software • Organizational: Policy changes, competition • Maintenance Process • Different maintenance process models • Software • Maintainability, complexity, quality of documentation • Maintenance Personnel • Staff turnover, domain expertise Software Testing and Maintenance 9

  10. Lehman’s Laws • Law of continuing change: systems must be continually adapted • Law of increasing complexity: as a system evolves, its complexity increases unless work is done to maintain or reduce it • Law of continuing growth: functionality must be increased continually to maintain user satisfaction • Law of declining quality: system quality will appear to decline unless rigorously adapted Software Testing and Maintenance 10

  11. Software Change • Corrective change: triggered by defects in the software • Residual errors in design and/or coding • Adaptive change: driven by the need to accommodate modifications in the environment • Innovations in hardware/software, changes in business rules • Perfective change: undertaken to expand the existing requirements • Enhancement of functionality, improvement in computational efficiency • Preventive change: undertaken to prevent malfunctions or to improve maintainability • Code restructuring, optimization and documentation updating Software Testing and Maintenance 11

  12. Interplay of changes Adaptive change Perfective change Corrective change Leads to Preventive change Software Testing and Maintenance 12

  13. 60 50 40 Percentage of Maintenance effort 30 20 10 Adaptive Perfective Others Corrective Expenditure on Different Changes 30 : 70 Devel : maintenance Change Software Testing and Maintenance 13

  14. Major Activities • Change identification • What to change, why to change • Program understanding • How to make the change, what is the ripple effect • Carrying out the change and testing • How to actually implement the change and ensure its correctness • Configuration management • How to manage and control the changes • Management issues • How to build a team Software Testing and Maintenance 14

  15. Software Maintenance • Introduction • Process Models • Program Understanding • Configuration Management • Management Issues • Conclusion Software Testing and Maintenance 15

  16. Development Models • Code-and-Fix • Ad-hoc, not well-defined • Waterfall • Sequential, does not capture the evolutionary nature of software • Spiral • Heavily relies on risk assessment • Iterative • Incremental, but constant changes may erode system architecture Software Testing and Maintenance 16

  17. Quick-Fix Model Problem Found Fix it Software Testing and Maintenance 17

  18. Boehm’s Model Management decision Proposed changes Approved changes Change Implemented Evaluation Results New version Software in use Software Testing and Maintenance 18

  19. Osborne’s Model Identification of need for change Change request submitted Requirements analysis Change request rejected approved Task scheduled Design analysis Design review Code modification Review of proposed change Testing Documentation update Standards audit cancellation User acceptance Post-installation review of changes Task completed Software Testing and Maintenance 19

  20. Iterative Enhancement Model Analyze existing system Redesign Current Version and implement Characterise Proposed modifications Software Testing and Maintenance 20

  21. Maintenance Effort (1) Leintz and Swanson’s Survey software maintenace effort 54.7% 45.3% • Non discretionary • Maintenance • emergency fixes • debugging • changes to input data • changes to hardware • Discretionary maintenance • enhancements for users • documentation improvement • improving efficiency Software Testing and Maintenance 21

  22. Maintenance effort Development analysis specification design implementation testing operation Maintenance Effort (2) Software Testing and Maintenance 22

  23. Software Maintenance • Introduction • Process Models • Program Understanding • Configuration Management • Management Issues • Conclusion Software Testing and Maintenance 23

  24. What to understand • Problem Domain • Capture necessary domain knowledge from documentation, end-users, or the program source • Execution Effect • Input-output relation, knowledge of data flow, control flow, and core algorithms • Cause-Effect Relation • How different parts affect and depend on each other • Product-Environment Relation • How the product interacts with the environment Software Testing and Maintenance 24

  25. Comprehension Process (1) Read documentation Read the source code Static analysis Run the program Dynamic analysis Software Testing and Maintenance 25

  26. Comprehension Process (2) • Knowledge base: expertise and background knowledge • Mental model: encodes the current understanding • Assimilation: obtain information from various sources Software Testing and Maintenance 26

  27. Comprehension Strategies • Top-down: start with the big picture, and then gradually work towards understanding the low-level details • Bottom-up: start with low-level semantic structures, and then group them into high-level, more meaningful structures • Opportunistic: A combination of top-down and bottom-up Software Testing and Maintenance 27

  28. Factors affecting understanding • Expertise: Domain knowledge, programming skills • Program structure: modularity, level of nesting • Documentation: readability, accuracy, up-to-date • Coding conventions: naming style, design patterns • Comments: quality, shall convey additional information • Program presentation: good use of indentation and spacing Software Testing and Maintenance 28

  29. Reverse Engineering • The process of analyzing the source code to create system representations at higher levels of abstraction • Three types of abstraction • Function abstraction: what it does, instead of how • Data abstraction: abstract data type • Process abstraction: communication and synchronization between different processes Software Testing and Maintenance 29

  30. Why RE? • Allow a software system to be understood in terms of what it does, how it works and its architectural representation • Recover lost information • Facilitate migration between platforms • Improve or provide documentation • Provide alternative views • Extract reusable components • Cope with complexity Software Testing and Maintenance 30

  31. Implementation Specification Design Re-documentation Re-documentation Re-documentation Levels of RE Spec recovery Reverse engineering Design recovery Software Testing and Maintenance 31

  32. Software Maintenance • Introduction • Process Models • Program Understanding • Configuration Management • Management Issues • Conclusion Software Testing and Maintenance 32

  33. Why CM? • Critical to the management and maintenance of any large system • Suppose that a customer reports a bug. Without proper control, it may be impossible to address this problem. (Why?) • CM allows different releases to be made from the same code base • CM also allows effective team work, auditing, and accounting Software Testing and Maintenance 33

  34. Major activities • Identification of components and changes • Control of the way changes are made • Auditing changes – making the current state visible • Status accounting – recording and documenting all activities that have taken place Software Testing and Maintenance 34

  35. The Big Picture Process Mgmt Project Mgmt Policy Enforcement Configuration Mgmt Tracking defects Version control Building Environment mgmt Process control Quality assurance Software Testing and Maintenance 35

  36. Object 2 Ver 1 Object 3 Ver 1 Object 4 Ver 1 Object 2 Ver 2 Object 3 Ver 2 Object 4 Ver 2 Object 2 Ver 3 Object 3 Ver 3 Object 3 Ver 4 Object 1 Ver 1 Object 1 Ver 2 Version Control (1) Release 1.0 Release 2.0 Release 3.0 Software Testing and Maintenance 36

  37. Version Control (2) Object 1 Ver 1.0 Ver 1.2 Ver 1.1 Ver 2.0 Ver 2.1 Ver 3.0 Software Testing and Maintenance 37

  38. Building • One of the most frequently performed operations • Incremental building: only rebuild objects that have been changed or have had a dependency change • Consistency: must use appropriate versions of the source files • Makefiles are often used to declare dependencies between different modules Software Testing and Maintenance 38

  39. Change Control • Decide if a requested change should be made • Is it valid? Does the cost of the change outweigh its benefit? Are there any potential risks? • Mange the actual implementation of the change • Allocate resources, record the change, monitor the progress • Verify that the change is done correctly • Ensure that adequate testing be performed Software Testing and Maintenance 39

  40. Change Request Form • Name of system: • Version: • Revision: • Date: • Requested by: • Summary of change: • Reasons of change: • Software components requiring change: • Documents requiring change: • Estimated cost: Software Testing and Maintenance 40

  41. Documentation • User Doc: Describe system functions without reference their implementation • Installation manual, user manual, reference manual, admin manual, etc. • System Doc: System description from the developer’s perspective • Requirements, specification, high-level/low-level design, test plans Software Testing and Maintenance 41

  42. Producing Quality Documentation • Writing style: adhere to guidelines, be clear • Adhering to document standards • Standards and quality assessment • For example, documents need to be reviewed and signed off • Maintaining consistency • Design documents should be consistent with actual implementation code • Documents that reference each other should be consistent Software Testing and Maintenance 42

  43. Software Maintenance • Introduction • Process Models • Program Understanding • Configuration Management • Management Issues • Conclusion Software Testing and Maintenance 43

  44. Responsibilities • Maximize productivity • Personnel management • Choose the right people, motivate the team, keep the team informed, allocate adequate resources • Organizational mode • Combined or separate maintenance teams, module ownership, change ownership, work-type or application-type Software Testing and Maintenance 44

  45. Motivating the Team • Rewards: financial rewards, promotion • Supervision: technical supervision and support for inexperienced staff • Assignment patterns: rotate between maintenance and development • Recognition: properly acknowledge one’s achievements • Career structure: provide room for career growth Software Testing and Maintenance 45

  46. Education and Training • Objective: To raise the level of awareness • Not a peripheral activity, but at the heart of an organization • Strategies • University education • Conferences and workshops • Hands-on experience Software Testing and Maintenance 46

  47. Module Ownership • Pros • The module owner develops a high level of expertise in the model • Cons • No one is responsible for the entire system • Workload may not be evenly distributed • Difficult to implement enhancements due to unknown dependencies Software Testing and Maintenance 47

  48. Change Ownership • Pros: • Tends to adhere to standards set for the entire software system • Integrity of the change is ensured • Changes can be code and tested independently • Changes inspection tends to be taken seriously • Cons: • Training of new personnel can be difficult • Individuals do not have long-lasting responsibilities Software Testing and Maintenance 48

  49. Software Maintenance • Introduction • Process Models • Program Understanding • Configuration Management • Management Issues • Conclusion Software Testing and Maintenance 49

  50. Conclusion • Maintenance a critical stage in the software lifecycle, and must be managed carefully • Unlike new development, maintenance must work within the constraints of the existing system • Central to maintenance is the notion of change. Changes must be managed and controlled properly. • Not only the code needs to be maintained, but also the documentation. Software Testing and Maintenance 50

More Related