SE420 - Software Quality Assurance http://dilbert.com/strips/comic/2006-01-29/ Lecture 3 Unit Testing, Part-2 January 21, 2019 Sam Siewert
Reminders Assignment #2 Posted Thursday [Unit Re-Use] Explore 3 Options for Assignments #3, #4, #5, #6 (Scaffold) Choose One [Work Together or Alone] Option 1 Encryption/Decryption of Files Option 2 RAID 10 and 50 File of Files Option 3 PPM File Image Processing, 3 Transforms (Brighten, Gamma Correct, and Sharpen) Option 4 Open Source Code of your interest Remaining Assignments [Top Down] #3 Specification and Acceptance Test #4 System Design and System Integrated Test #5 Design, Module Unit Tests and Regression Suite #6 Complete Code, Refine and Run all V&V Tests and Deliver Assignment #1 Grading in progress Sam Siewert 2
Requirements Generation and Acceptance Tests Require Experience Challenge of Waterfall and V Customer May Not Be Forthcoming Candidate or Reference Design and Code Re-Use May Be Best Starting Point to Drive Process Can Drive Top-Down (from concept to code) or Bottom-Up (from candidate code, design, system) Regression Testing Sam Siewert 3
Agile Development Methods http://dilbert.com/strips/comic/2007-11-26/ Not a New Process, Rather New Strategy for Existing Incremental Processes Sam Siewert 4
Workflow for a V with XP or Spiral Rather than Parallel Waterfall on Design/Dev Side and QA side, allow for Feedback or Evolution Task Level Workflow - E.g. Kanban (Github Project) Cycle time for SE420 and SE310 should be 2 weeks (for a Scrum Sprint) Hold stand-up meetings in class (at least once a week - provide status and re-task once teams are formed) Sam Siewert 5
Kanban on Whiteboard / Sticky Notes Kanban originally intended to be a physical workflow method Abstracted into software tools Github - Development workflow, Project boards Atlassian - https://confluence.atlassian.com/a gile/glossary/kanban-board Numerous other Agile and DevOps process management tools Columns depend on project and phase of Analysis, Design, Development, Test, etc. Facilitates stand-up status meetings Backlog (deferred tasks) Analysis, design features, tests, Ready (start implementation) Code construction, test plan, design, Doing (coding, testing, designing, ) On-hold (awaiting team decision) Done (ready for next phase) Move up or down the V Spiral to next quadrant Pass to new XP cycle or Scrum sprint Sam Siewert 6
Universal Principles for SQA and SWE Testing Throughout Process Life-cycle is Concurrent with Engineering (The Boehm V ). Testing Activity & Strategy Match Phase of Engineering Acceptance Testing Requirements System & Integration Testing System and Architecture Design Detailed Design and Coding Design Execution, Unit Testing Iteration and Sustaining Regression Testing at all Levels Validation (Building Right Thing), Verification (Built Right) are Continuous Activities, Equally Important Avoid Rigid Long Phases and Silos, Solicit Requirements Sam Siewert 7
Agile Manifesto http://agilemanifesto.org/principles.html 1. Early and Continuous Software Delivery to Customer 2. Welcome Changing Requirements, Even Late in Process 3. Deliver Working Software Frequently 4. Sponsors and Developers Work Together Start to End 5. Build Project Around Motivated Developers, Empower 6. Face-to-Face Primary Method of Communication 7. Working Software Primary Success Metric 8. Process and Pace Must be Sustainable (No Burnout) 9. Continuous Attention to Design 10. Simplify and Maximize Work Not Done Less is More 11. Best Requirements, Architecture, Design Come from Self- Organizing Teams 12. Regular Interval to Tune and Adjust Behavior Sam Siewert 8
Agile Practices Acceptance Test Driven Development (Requirements) Inherently Evolutionary Principals (Extreme, Spiral, Risk Control, Adaptive) Imagine Boehm s V as a Funnel with Spiral Inside it Where Phases of Analysis, Design, Coding are Concurrent with Test, But Also Spiral for Early Deliveries Acceptance Test is Focus, but Unit Tests, Integration tests, System Tests, Regression Required Along the Way Executable Design (Simulation State Machines) Proof-of-Concept Feasibility of Highest Risk Design Units Evolutionary Prototypes Solicit Early User Feed-back Sprint (Evolutionary Cycle in Spiral) Scrum Meetings (Quick, Stand-up Meetings, What is Done, What is to be Done, Blockers) Sprint Retrospective Customers are Internal as Well-as External Sam Siewert 9
Agile Advantages Does Not Dictate a Process Fit Current Process to Agile Principals Implies Evolutionary Process and Concurrent Engineering and Test Works with Extreme Programming and Tight Spiral and V Models, Could Work with Feed-back Waterfall, but Awkward Sustainable Focus on Team Behavior Works Well in Rapidly Evolving Markets http://en.wikipedia.org/wiki/extreme_programming Extreme Programming Process 1. Faster Iteration of Spiral 2. Iterate Release Plan to Code Process 3. Acceptance Test Driven 4. Program in Pairs (Walk-through) 5. Design Refinement Throughout Process 6. Define Requirements with Communication 7. Code in Small Increments 8. Revisit Requirements & Design Often Sam Siewert 10
Misinterpretations of Agile Process and Rigor is No Longer Needed Steps Can Be Skipped (Instead, Moved Up in Time & Iterated) Code First, Figure out Requirements and Design Later Requirements and Acceptance Testing De-emphasized Shortens Overall Development Time http://dilbert.com/strips/comic/2005-11-16/ Sam Siewert 11
Note on Top-Down & Bottom-Up Top-Down is Decomposition of System of Systems System Sub-system Units and Components Bottom-Up is Construction of a System of Systems Units and Components Selected and/or Perfected Sub-system Designs Improved with Better Components Systems Simplified System of Systems Eliminate Overlap and Redundancy Bottom-Up for Evolutionary Process Can Do Both with Iteration and Agile Principles Sam Siewert 12
Incremental - Spiral Model In Evolutionary (Extreme and Spiral Methods), Unit Coding and Testing Prior to Next Analysis & Design Phase Assume Professor Did Reasonable First-Cut Analysis and Design and Focus on Small Unit of Design Gain Detailed Test Experience Prevents Start-Up Requirements in a Vacuum Challenge Models Code Unit-Level Re-Use Challenges Sam Siewert 13
Linux Skills Building Unit Test Drivers (Strategy and Methods) January 24, 2017 Sam Siewert
Assignment #2 Use Code Example Unit Crypto Transposition or Substitution Functions RAID Parity or Mirroring with Striping PPM Transform Debug to Determine Paths and To Drive Test Cases Develop Test Drivers (One Positive, One Negative) Test Tests Run Tests and Produce Test Report Package for Delivery (Report) Sam Siewert 15
Start with Example Code Build, Run, Debug Core Unit (Potential Re-Use) Document Requirements and Use Cases (Acceptance Test Driven) Read Backgrounder and Review Example Code Make Assumptions, Communicate Face-to-Face and Via Assignment #2 Requirements Outline Acceptance Test for Assignment #6 (Requirements Vacuum) Devise Unit Tests for Core Unit Unit Driver Links Software Unit (to Be Used in Design) Driver Uses as Expected (Developer) Also Tests Negative, Stress, Corner Cases (SQA) Sam Siewert 16