240 likes | 403 Views
Software Quality Management and Process Improvement. CS 123/CS 231. Software Quality. Quality Management Chapter 30 of Sommerville book Process Improvement Chapter 31 of Sommerville book Chapter 2 of Pressman book. Process vs Product Quality.
E N D
Software Quality Managementand Process Improvement CS 123/CS 231
Software Quality • Quality Management • Chapter 30 of Sommerville book • Process Improvement • Chapter 31 of Sommerville book • Chapter 2 of Pressman book
Process vs Product Quality • Process Quality directly affects Product Quality • Should measure both product and process • Standards • define characteristics that all product components should exhibit • define how the software process should be conducted
Product Design review form Document naming Procedure headers Programming style Change request form Process Design review conduct Document submission Version release Change control Test recording Standards (Example)
Metrics • Software metric • type of measurement that relates to a system, process, related documentation • Examples • lines of code • Fog index--readability of a manual • number of reported faults
Process Improvement • Definition • Understanding existing processes and changing these processes to improve quality and/or reduce cost and development time • Process Improvement Process (iterative) • analyze process • identify improvements • introduce change, train personnel, fine-tune
The SEI CMM • Capability Maturity Model (CMM) • defines levels of maturity of software processes • See Section 31.4 • Initiated by the Software Engineering Institute (SEI) • for the US Dept of Defense • goal: assess capability of contractors
Five CMM Levels • Initial Level • no effective formal processes • success dependent on individual capability • Repeatable Level • some formal processes exist • can successfully repeat projects of the same type • no formal process model
CMM Levels, continued • Defined Level • formal process model exists • conscious of process improvement • Managed Level • quantitative measures • process improvement based on metrics • Optimizing Level • deliberate, continuing process improvement
Testing CS 123/CS 231
References • Debugging and Testing • Reiss, Chapter 8 • Verification and Validation • Sommerville, Chapters 22-24
Debugging & Testing: Definitions • Bug • a defect or error in a program • Testing • running a program with the intent of finding bugs (defect testing) • Debugging • determining the exact nature of a bug
Types of Bugs • Syntactic Bugs • syntax errors, typos • Design Bugs • Logic Bugs • Interface Bugs • method invocation versus definition • Memory Bugs
Steps in Debugging • Locating the problem/cause • the more difficult step (in general) • use inductive/deductive reasoning • Repairing the problem • if design bug, consequences are often extensive • note that solution may result in more bugs • regression testing
Defensive Design • Simplicity • in class interfaces • in algorithms • Encapsulation • minimizes coupling; increased correlation between locations of error and cause • Error-handling • design with error in mind
Defensive Coding • Writing code to simplify debugging • What to watch out for: • initialization • method preconditions (check for valid parameter values) and return value cases • complex code / bug “history” • Language support • assertions (in C,C++ - assert.h), exceptions
Reviews • Particularly for large projects with several designers and programmers involved • Design Review • presentation to other developers, stakeholders, and outside consultants • brings out other, external perspectives • Code Review • walk through your code, line by line
Debugging Tools • Controlling execution • breakpoints, tracepoints, watchpoints • single-step execution • Observing execution • watches (displays) • view execution stack, view memory • Alternative: inserting print statements (!)
Testing • May be performed at different levels • Static Testing • testing without program execution • code review, inspection, walkthrough • Dynamic Testing • module testing, integration testing • system/regression testing • black-box vs white-box testing
Stages in the Testing Process • Unit Testing • Module Testing • Sub-System Testing • System/Integration Testing • Acceptance Testing
Testing Strategies • Top-down testing • Bottom-up testing • Thread-testing • Stress testing • Back-to-back testing
How to Test • Devise Test Plan • clear/consistent procedure/standards for testing a system • Identify Test Cases • thorough listing of possible inputs • include boundaries, invalid/unexpected inputs • Implement the Test • write test code (test drivers), use testing tools
Test Cases • Equivalence Partitioning • partition input (& output) into classes that are processed equivalently by the program • Test Case Guidelines • Example: for arrays, consider varying sizes, test for first, middle, and last element • Path Testing • based on possible execution paths; white-box