Unformatted text preview:

Software Testing g and Maintenance Agile Software Development Jeff Offutt SWE 437 George Mason University 2008 Based on Agile Estimating and Planning Cohn Prentice Hall Chapters 1 3 Thanks to Ian Sommerville Agile Software Development 1 Agile Process Overview 2 Extreme Programming 2 3 Refactoring 4 Refactoring Techniques SWE 437 Software Testing and Maintenance Jeff Offutt 2 1 Agile Software Development Manifesto We are uncovering better ways of developing software by doing it and helping others do it Through this work we have come to value Individuals I di id l andd interactions i t ti over processes andd tools t l Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is while there is value in the items on the right we value the items on the left more Kent Beck et al Jeff Offutt SWE 437 Software Testing and Maintenance 3 What is Agility Effective rapid and adaptive response to change Effective communication among all stakeholders Drawing g the customer onto the team Organizing a team so that it controls the work Yielding Rapid incremental delivery of software SWE 437 Software Testing and Maintenance Jeff Offutt 4 2 An Agile Process Is driven by customer descriptions of what is required scenarios Recognizes that plans are short lived Develops software iteratively with a heavy emphasis on construction activities Delivers multiple software increments Adapts as changes occur Lots of agile processes have been defined XP is the most widely known SWE 437 Software Testing and Maintenance Jeff Offutt 5 Agile Software Development 1 Agile Process Overview 2 Extreme 2 Extreme Programming Programming 3 Refactoring 4 Refactoring Techniques SWE 437 Software Testing and Maintenance Jeff Offutt 6 3 Extreme Programming XP The most widely used agile process XP Planning g Begins with the creation of user stories Agile team assesses each story and assigns a cost Stories are grouped into deliverable increments A commitment is made on delivery date After the first increment project velocity is used to help define subsequent delivery dates for other increments SWE 437 Software Testing and Maintenance Jeff Offutt 7 Extreme Programming XP XP Design Follows the KISS principle For difficult design problems suggests the creation of spike solutions a design prototype Encourages refactoring an iterative refinement of the internal program design XP Programming Recommends the construction of unit tests before programming starts Encourages pair programming XP Testing All unit tests are executed daily Acceptance tests are defined by the customer and executed to assess customer visible functionality SWE 437 Software Testing and Maintenance Jeff Offutt 8 4 Extreme Programming XP User stories values acceptance test criteria iteration plan Prototypes Simple design Design Planning Refactoring Pair programming C di Coding Release Test Acceptance testing SWE 437 Software Testing and Maintenance Unit test Continuous integration Jeff Offutt 9 Agile Software Development 1 Agile Process Overview 22 Extreme Programming Refactoring 3 Refactoring 4 Refactoring Techniques SWE 437 Software Testing and Maintenance Jeff Offutt 10 5 Refactoring Refactoring is a disciplined process of changing a software system in such a way that it does not alter the external behavior of the code while at the same time improves its internal structure Noun A change made to internal structure of software to make it easier to understand and modify without changing its observable behavior Verb To structure software by applying a series of refactorings without changing its observable behavior SWE 437 Software Testing and Maintenance Jeff Offutt 11 Refactoring Basic metaphor Start with an existing code base and make it better Change the internal structure in the small to in the medium while preserving the overall semantics i e rearrange the factors but end up with the same final product The idea is that you should significantly improve the code Reducing near duplicate code Improved cohesion less coupling Improved parameterization understandability maintainability flexibility abstraction efficiency etc This is much harder if the high level architecture of the software is poorly designed SWE 437 Software Testing and Maintenance Jeff Offutt 12 6 Refactoring Why When Who Improve the Design Without refactoring the design of the program will decay As people change code changes to realize short term goals or changes made without a full comprehension of the design of the code the code loses its structure Make Software Easier to Understand Several users of code the computer the writer and the updater The most important by far is the updater Who cares if the compiler takes a few more cycles to compile your code If it takes someone 3 weeks to update your code that is a problem SWE 437 Software Testing and Maintenance Jeff Offutt 13 Refactoring Why When Who Helps find faults Part of refactoring code is understanding the code and putting that understanding back in That process helps clarify the program That clarification allows faults to be found Program faster Refactor continuously as you develop Every day look at yesterday s work to see if it needs to be improved Without a ggood design g you y can progress p g q quickly y for a while but soon poor design starts to slow you down You spend time finding and fixing faults and understanding the system instead of adding new function New features need more coding as you patch over patches SWE 437 Software Testing and Maintenance Jeff Offutt 14 7 Refactoring Design and Performance Refactoring complements design By doing some of the design in process programmers avoid the problems of over designing for reuse reuse flexibility flexibility or extendibility that is never needed In the short term refactoring may make the code slower Optimize for performance separately Typically only 10 of the software accounts for 90 of the execution time only optimize that 10 SWE 437 Software Testing and Maintenance Jeff Offutt 15 Agile Software Development 1 Agile Process Overview 2 Extreme Programming 2 3 Refactoring 4 Refactoring Refactoring Techniques Techniques SWE 437 Software Testing and Maintenance Jeff Offutt 16 8 Refactoring Catalog Refactoring Improving the Design of Existing Code by Martin Fowler et al 1999 Addison Wesley Clarifies and catalogs many of the strategies that good OO programmers have been doing for years 22 bad smells issues


View Full Document

MASON SWE 437 - Agile Software Development

Loading Unlocking...
Login

Join to view Agile Software Development and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Agile Software Development and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?