Thursday, August 14, 2014

Agile methodology - Agile software development

Agile methodology
Agile software development
Refers to a group of software development methodologies based on iterative development, where requirements and solutions evolve through collaboration between self-organizing cross-functional teams. The term was coined in the year 2001 when the Agile Manifesto was formulated.
Agile methods generally promote a disciplined project management process that encourages frequent inspection and adaptation, a leadership philosophy that encourages teamwork, self-organization and accountability, a set of engineering best practices intended to allow for rapid delivery of high-quality software, and a business approach that aligns development with customer needs and company goals.
Conceptual foundations of this framework are found in modern approaches to operations management and analysis, such as lean manufacturingsoft systems methodologyspeech act theory (network of conversations approach), and Six Sigma
There are many specific agile development methods. Most promote development iterations, teamwork, collaboration, and process adaptability throughout the life-cycle of the project.
Agile methods break tasks into small increments with minimal planning, and do not directly involve long-term planning. Iterations are short time frames ("timeboxes") that typically last from one to four weeks. Each iteration involves a team working through a full software development cycle including planning, requirements analysisdesigncodingunit testing, and acceptance testing when a working product is demonstrated to stakeholders. This helps minimize overall risk, and lets the project adapt to changes quickly. Stakeholders produce documentation as required. An iteration may not add enough functionality to warrant a market release, but the goal is to have an available release (with minimal bugs) at the end of each iteration. Multiple iterations may be required to release a product or new features.
Team composition in an agile project is usually cross-functional and self-organizing without consideration for any existing corporate hierarchy or the corporate roles of team members. Team members normally take responsibility for tasks that deliver the functionality an iteration requires. They decide individually how to meet an iteration's requirements.
Agile methods emphasize face-to-face communication over written documents when the team is all in the same location. When a team works in different locations, they maintain daily contact through videoconferencing, voice, e-mail, etc.
Most agile teams work in a single open office (called bullpen), which facilitates such communication. Team size is typically small (5-9 people) to help make team communication and team collaboration easier. Larger development efforts may be delivered by multiple teams working toward a common goal or different parts of an effort. This may also require a coordination of priorities across teams.
No matter what development disciplines are required, each agile team will contain a customer representative. This person is appointed by stakeholders to act on their behalf and makes a personal commitment to being available for developers to answer mid-iteration problem-domain questions. At the end of each iteration, stakeholders and the customer representative review progress and re-evaluate priorities with a view to optimizing the return on investment and ensuring alignment with customer needs and company goals.
Most agile implementations use a routine and formal daily face-to-face communication among team members. This specifically includes the customer representative and any interested stakeholders as observers. In a brief session, team members report to each other what they did yesterday, what they intend to do today, and what their roadblocks are. This standing face-to-face communication prevents problems being hidden.
Agile emphasizes working software as the primary measure of progress. This, combined with the preference for face-to-face communication, produces less written documentation than other methods—though, in an agile project, documentation and other artifacts rank equally with a working product. The agile method encourages stakeholders to prioritize wants with other iteration outcomes based exclusively on business value perceived at the beginning of the iteration.
Specific tools and techniques such as continuous integration, automated or xUnit testpair programmingtest driven developmentdesign patternsdomain-driven designcode refactoring and other techniques are often used to improve quality and enhance project agility.

History

The modern definition of agile software development evolved in the mid-1990s as part of a reaction against "heavyweight" methods, perceived to be typified by a heavily regulated, regimented, micro-managed use of the waterfall model of development. The processes originating from this use of the waterfall model were seen as bureaucratic, slow, demeaning, and inconsistent with the ways that software developers actually perform effective work. A case can be made that agile and iterative development methods mark a return to development practice from early in the history of software development. Initially, agile methods were called "lightweight methods."
An adaptive software development process was introduced in a paper by Edmonds (1974). Notable early Agile methods include Scrum (1995), Crystal ClearExtreme Programming (1996), Adaptive Software DevelopmentFeature Driven Development, and Dynamic Systems Development Method (DSDM) (1995). These are now typically referred to as Agile Methodologies, after the Agile Manifesto published in 2001.
In 2001, 17 prominent figures in the field of agile development (then called "light-weight methods") came together at the Snowbird ski resort in Utah to discuss ways of creating software in a lighter, faster, more people-centric way. They coined the terms "Agile Software Development" and "agile methods", and they created the Agile Manifesto, widely regarded as the canonical definition of agile development and accompanying agile principles. Later, some of these people formed The Agile Alliance, a non-profit organization that promotes agile development.

Principles

Agile methods are a family of development processes, not a single approach to software development. The Agile Manifesto states:
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 and interactions over processes and tools 
· 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.
Some of the principles behind the Agile Manifesto are:
· Customer satisfaction by rapid, continuous delivery of useful software 
· Working software is delivered frequently (weeks rather than months) 
· Working software is the principal measure of progress 
· Even late changes in requirements are welcomed 
· Close, daily cooperation between business people and developers 
· Face-to-face conversation is the best form of communication (co-location) 
· Projects are built around motivated individuals, who should be trusted 
· Continuous attention to technical excellence and good design 
· Simplicity 
· Self-organizing teams 
· Regular adaptation to changing circumstances 
The manifesto spawned a movement in the software industry known as agile software development.
In 2005, Alistair Cockburn and Jim Highsmith gathered another group of people—management experts, this time—and wrote an addendum, known as the PM Declaration of Interdependence.
The functioning principles of Agile can be found in lean manufacturing and six sigma. These concepts include error proofing, eliminating waste, creating flow, adding customer value, and empowering workers. The concepts were first formally espoused in the 14 principles of the Toyota Way, the two pillars of the Toyota Production System (Just-in-time and smart automation), the 5S methodology, and Deming’s 14 points. These have been summarized in the seven points of lean software development.

Comparison with other methods

Agile methods are sometimes characterized as being at the opposite end of the spectrum from "plan-driven" or "disciplined" methods. This distinction is misleading, as it implies that agile methods are "unplanned" or "undisciplined". A more accurate distinction is that methods exist on a continuum from "adaptive" to "predictive". Agile methods lie on the "adaptive" side of this continuum.
Adaptive methods focus on adapting quickly to changing realities. When the needs of a project change, an adaptive team changes as well. An adaptive team will have difficulty describing exactly what will happen in the future. The further away a date is, the more vague an adaptive method will be about what will happen on that date. An adaptive team can report exactly what tasks are being done next week, but only which features are planned for next month. When asked about a release six months from now, an adaptive team may only be able to report the mission statement for the release, or a statement of expected value vs. cost.
Predictive methods, in contrast, focus on planning the future in detail. A predictive team can report exactly what features and tasks are planned for the entire length of the development process. Predictive teams have difficulty changing direction. The plan is typically optimized for the original destination and changing direction can cause completed work to be thrown away and done over differently. Predictive teams will often institute a change control board to ensure that only the most valuable changes are considered.
Agile methods have much in common with the "Rapid Application Development" techniques from the 1980/90s as espoused by James Martin and others.

Contrasted with other iterative development methods

Most agile methods share other iterative and incremental development methods' emphasis on building releasable software in short time periods. Agile development differs from other development models: in this model time periods are measured in weeks rather than months and work is performed in a highly collaborative manner. Most agile methods also differ by treating their time period as a timebox.

Contrasted with the waterfall model

Agile development has little in common with the waterfall model. As of 2009, the waterfall model is still in common use. The waterfall model is the most structured of the methods, stepping through requirements-capture, analysis, design, coding, and testing in a strict, pre-planned sequence. Progress is generally measured in terms of deliverable artifacts: requirement specifications, design documents, test plans, code reviews and the like.
A common criticism of the waterfall model is its inflexible division of a project into separate stages, where commitments are made early on, making it difficult to react to changes in requirements as the project executes. Iterations are expensive. This means that the waterfall model is likely to be unsuitable if requirements are not well understood or are likely to change in the course of the project. 
Agile methods, in contrast, produce completely developed and tested features (but a very small subset of the whole) every few weeks. The emphasis is on obtaining the smallest workable piece of functionality to deliver business value early, and continually improving it and adding further functionality throughout the life of the project. If a project being delivered under the waterfall method is cancelled at any point up to the end, there is nothing to show for it beyond a huge resources bill. With the agile method, being cancelled at any point will still leave the customer with some worthwhile code that has likely already been put into live operation.
Adaptations of Scrum show how agile methods are augmented to produce and continuously improve a strategic plan.
Some agile teams use the waterfall model on a small scale, repeating the entire waterfall cycle in every iteration. Other teams, most notably Extreme Programming teams, work on activities simultaneously.

Contrasted with "cowboy coding"

Cowboy coding is the absence of a defined method; i.e., team members do whatever they feel is right. The Agile approach is often confused with cowboy coding, due to Agile's frequent re-evaluation of plans, emphasis on face-to-face communication, and relatively sparse use of documentation. However, Agile teams follow defined—and often very disciplined and rigorous—processes. 
As with all development methods, the skill and experience of users determine the degree of success and/or abuse of such activity. Rigid controls, which are systematically embedded within an Agile process, offer stronger levels of accountability. The degradation of well-intended procedures can lead to activities that are often categorized as cowboy coding.

Suitability of agile methods

There is little if any consensus on what types of software projects are best suited for the agile approach. Many large organizations have difficulty bridging the gap between the traditional waterfall method and an agile one.
Large scale agile software development remains an active research area. 
Agile development has been widely documented as working well for small (<10 developers) co-located teams.
Some things that can negatively impact the success of an agile project are:
· Large scale development efforts (>20 developers), though scaling strategies and evidence to the contrary have been described. 
· Distributed development efforts (non-co-located teams). Strategies have been described in Bridging the Distance and Using an Agile Software Process with Offshore Development[ 
· Command-and-control company cultures
· Forcing an agile process on a development team
· Mission critical systems where failure is not an option at any cost (Software for surgical procedures). 
Several successful large scale agile projects have been documented. BT has had several hundred developers situated in the UK, Ireland and India working collaboratively on projects and using Agile methods. While questions undoubtedly still arise about the suitability of some Agile methods to certain project types, it would appear that scale or geography, by themselves, are not necessarily barriers to success. 
Barry Boehm and Richard Turner suggest that risk analysis be used to choose between adaptive ("agile") and predictive ("plan-driven") methods. The authors suggest that each side of the continuum has its own home ground as follows:
Agile home ground: 
· Low criticality 
· Senior developers 
· Requirements change often 
· Small number of developers 
· Culture that thrives on chaos 
Plan-driven home ground: 
· High criticality 
· Junior developers 
· Requirements do not change often 
· Large number of developers 
· Culture that demands order 

Agile methods and method tailoring

In the literature, different terms refer to the notion of method adaptation, including ‘method tailoring’, ‘method fragment adaptation’ and ‘situational method engineering’. Method tailoring is defined as:
A process or capability in which human agents through responsive changes in, and dynamic interplays between contexts, intentions, and method fragments determine a system development approach for a specific project situation. 
Potentially, almost all agile methods are suitable for method tailoring. Even the DSDM method is being used for this purpose and has been successfully tailored in a CMM context. Situation-appropriateness can be considered as a distinguishing characteristic between agile methods and traditional software development methods, with the latter being relatively much more rigid and prescriptive. The practical implication is that agile methods allow project teams to adapt working practices according to the needs of individual projects. Practices are concrete activities and products that are part of a method framework. At a more extreme level, the philosophy behind the method, consisting of a number of principles, could be adapted Extreme Programming (XP) makes the need for method adaptation explicit. One of the fundamental ideas of XP is that no one process fits every project, but rather that practices should be tailored to the needs of individual projects. Partial adoption of XP practices, as suggested by Beck, has been reported on several occasions. A tailoring practice is proposed by Mehdi Mirakhorli which provides sufficient roadmap and guideline for adapting all the practices. RDP Practice is designed for customizing XP. This practice first time proposed as a long research paper in APSO workshop at ICSE 2008 conference and yet it is the only proposed and applicable method for customizing XP. Although it is specifically a solution for XP, this practice has the capability of extending to other methodologies. At first glance, this practice seems to be in the category of static method adaptation but experiences with RDP Practice say that it can be treated like dynamic method adaptation. The distinction between static method adaptation and dynamic method adaptation is subtle. The key assumption behind static method adaptation is that the project context is given at the start of a project and remains fixed during project execution. The result is a static definition of the project context. Given such a definition, route maps can be used in order to determine which structured method fragments should be used for that particular project, based on predefined sets of criteria. Dynamic method adaptation, in contrast, assumes that projects are situated in an emergent context. An emergent context implies that a project has to deal with emergent factors that affect relevant conditions but are not predictable. This also means that a project context is not fixed, but changing during project execution. In such a case prescriptive route maps are not appropriate. The practical implication of dynamic method adaptation is that project managers often have to modify structured fragments or even innovate new fragments, during the execution of a project (Aydin et al., 2005). 

Agile methods and project management

Agile methods differ to a large degree in the way they cover project management. Some methods are supplemented with guidelines on project management, but there is generally no comprehensive support. 
Both PMP and PRINCE2 have been suggested as suitable, complementary project management systems. 

Aglie Performance Testing - Agile Learning

Aglie Performance Testing
Abstract
Increase in competition and leaps in technology have forced companies to adopt innovative approaches to have a system which performs well. Today performance testing happens just before product going live with very short timeframe allocated for it which leads to missing performance problems. With small extra efforts, efficiency of performance testing can be increased significantly and these extra efforts usually pay off multi-fold, which can be achieved using Agile Performance Testing.
This paper addresses performance testing using agile methodology, its approach, advantage, risk mitigation and many others.

1.0 Today’s Market need

Increase in competition and leaps in technology have forced companies to adopt innovative approaches to have an application which performs well. Having more features and functionality may not necessarily translate into success for a system - what ultimately count is how stable the consumer finds these features.
Thus performance testing is the testing conducted to evaluate the performance of a system with specified performance requirements. 
Today performance testing happens just before product going live with very short timeframe allocated for it. This may lead to missing performance problems and propagate to production and have unhappy customer. 
To have customer satisfaction in regards to performance, one can have Agile Performance Testing which states: -
 
With small extra efforts, making the process more agile, efficiency of performance testing increases significantly – and these extra efforts usually pay off multi-fold even before the end of performance testing.

2.0 Current Performance Testing

2.1 Objective

§ To validate/determine the performance behaviour of the system with respect to the end-user experience.

2.2 Approach

 

2.3 Risks

§ When major issues are found at the end of test life cycle, it becomes much more expensive to resolve them
§ Major performance issues identified during later stages may hold up important releases and delay the project delivery

2.4 Drawbacks

§ Performance tuning is applied to server-configurable performance parameters (Hardware/Software). Thus, scalability issues are addressed by expensive hardware/software resizing techniques
§ If code optimization is done, then one needs to go through the complete Testing Lifecycle.


3.0 Agile Performance Testing

3.1 Objective

§ To determine the performance bugs/bottlenecks in key business processes as early as possible during the project development cycle
§ Identify, isolate and fix performance bottlenecks at the component/code level

3.2 Approach

Agile Performance Testing is a three phases approach: -
§ Unit Level Tuning – For optimizing 
» Execute tests to isolate and fix bottlenecks at code level
§ Component Level Tuning – For testing Components 
§ Execute tests to isolate and fix bottlenecks in application components level.
§ Application Load Tuning – For testing Application Flows
§ Test the critical application flows for user-experience under normal and peak loads
 
Let’s have detail look at each of the phase: -
Unit Level Tuning
 
Component Level Tuning
 
Application Load Tuning
 

3.3 Benefits

§ Iterative performance testing leads to better code, optimized for performance
§ Early detection of performance bugs/bottlenecks reduces the effort & duration for performance tuning and retesting of application

4.0 Effort Metrics for a Release

What will be the efforts required to incorporate Agile Performance Testing?
To evaluate this, effort required is calculated based on following criteria during a release: - 
§ With No Change in requirement 
§ With Change in requirement

4.1 With No Change in Requirement

Testing Lifecycle
Current Approach
Agile PT Approach
Unit Testing
10
10
Unit Level Performance Tuning
0
2
Integration/Functional Testing
3
3
Component Level Tuning
0
2
UAT Testing
4
4
Application Load Testing
2
(Script Re-Used)1
Tuning Performance bottleneck at Code Level.
1
0
Tuning Performance bottleneck at Component Level.
0
1
Unit Testing after Tuning
2
Not Required, because Code Level Tuning has been already done in step2
Integration/Functional Testing after Tuning
1
UAT Testing after Tuning
2
Application Load Testing after Tuning
(Script needs to re-create due to code tuning)2
(Script Re-used)1
Total Efforts Required (Man Day)
28
24

Saving in Efforts = 28 – 24 = 4 Man Days = 14% (approx.) for one module

4.2 With Change in Requirement

When change in requirement is invoked, efforts required for testing lifecycle is less as compared to the efforts for first time testing of an application. And also Unit level tuning for CR depends on how changes made impact the working of application.
Example: -
Considering 2 CR’s are made, there are following 3 scenarios for effort saving: -
Scenario 1: 
» Performance Testing (Unit Level Tuning) is performed in DEV Environment considering major changes impacting the application for both the CRs.
 
Scenario 2: 
» Performance Testing (Unit Level Tuning) is not performed in DEV Environment considering minor changes not impacting the application for both the CRs.
 


Scenario 3:
» CR1 - Performance Testing is performed in DEV Environment considering major changes impacting the application.
» CR2 - Performance Testing is not performed in DEV Environment considering minor changes not impacting the application.
 

Note: Value may vary based on the data used for calculation of effort saving.



5.0 Risk Mitigation

Agile Performance Testing has positive outcome in risk mitigation with respect to: -
§ Customer Satisfaction
Customers/users have higher expectation about the quality of application.
§ Code Tuning
Unit Level tuning is done early so no need for code optimization at later stage on Testing Lifecycle.
§ Application Rejection
Reduces risk of the application being rejected because of issues such as Memory Leaks, Hard Coded Values in code, Database Locking
§ Release Dates
Iterative Testing leads to constant awareness of the application performance and therefore more confidence in meeting release dates.
§ Performance Bugs
Less Number of Performance bug(s) in subsequent phase(s).
§ Performance Testing Efforts
Performance Script can be re-used thus saving 60% of the efforts of Performance Cycle.

6.0 Advantage 

One Good decision at Start can cover a lot 
§ Earlier detection of performance bottlenecks
» Reduces the effort and duration for performance tuning and retesting
» Project management has constant awareness of the application performance and therefore more confidence in meeting release dates.
§ Faster resolution of identified issues 
» Bottom-up approach to identify bottlenecks helps narrowing down the root-cause faster
§ Better performance tuning
» Development team gets more time for performance tuning activities
§ Cost Effective
» Identified bottlenecks are resolved much earlier in Testing Lifecycle saving expenses required to a great extend.

7.0 Pre-requisite, Challenges and Risk

§ Pre-requisites
» Full time Performance Tester.
» Must be technically sound.
» Closer interactions between developers & testers
» Access to monitor all the servers.
§ Challenges
» Defining accurate performance requirements.
§ Risks
» Incorrect performance requirements may jeopardise the testing

8.0 Conclusion

Applications are backbone of business; hence performance of application becomes one of the key differentiators in success or failure of business. Thus performance testing is conducted to evaluate the performance of a system with specified performance requirements. 
In current approach, performance testing happens just before application going live with very short timeframe allocated for it. When major issues are found at the end of test life cycle, it becomes much more expensive to resolve them which may hold up important releases.
This calls for the solution which states - “Investigate performance early and Validate performance last
Agile Performance Testing does just that. With Agile Performance Testing, Project management is constantly aware of the application performance and therefore more confidence in meeting release dates.
Agile Performance Testing has positive outcome in risk mitigation because systems are getting more and more complex with a dynamic technology landscape and high standards of customer satisfaction