Chapter 5
Test Methodologies
Nguyn t Thng
Software Testing
Content
1
Introduction Test Principles Test Types Test Techniques Test Methodologies Test Automation Test Management Test Tools Test a Software Project
Software Testing 2
Nguyn t Thng
Test Methodologies
Waterfall Model V Model Iterative Model Prototype Model Agile Model
Nguyn t Thng
Software Testing
Waterfall model
Nguyn t Thng
Software Testing
Waterfall model (2)
Requirements phase: the requirements for the software are gathered and analyzed a complete specification of what the software is required to do is produced. Architectural design (analysis) phase: the implementation of the requirements is designed and specified. identifying the components of the software the relationships between the components
Nguyn t Thng Software Testing 5
Waterfall model (3)
Design phase: the detailed implementation of each component is specified. Code and unit test phase: each component of the software is coded and tested to verify that it faithfully implements the detailed design.
Nguyn t Thng
Software Testing
Waterfall model (4)
System integration System test phase: the software is integrated to the overall product and tested. Acceptance testing phase: tests are applied and witnessed to validate that the software faithfully implements the specified requirements.
Nguyn t Thng
Software Testing
Waterfall test
The model enforces testing in every stage in the form of reviews and unit testing. Problems are not detected until the system testing phase. For a phase to begin, the preceding phase must be complete.
Nguyn t Thng
Software Testing
V model
Business Requirements Project Specification System Specification Design Specification Acceptance Testing Integration Testing in the Large System Testing Integration Testing in the Small Component Testing
Software Testing 9
Code
Nguyn t Thng
V model (2)
Tests
Business Requirements
Tests
Acceptance Testing Integration Testing in the Large
Tests
Project Specification System Specification
Tests
System Testing Integration Testing in the Small
Tests
Design Specification
Code
Nguyn t Thng Software Testing
Component Testing
Design Tests?
10
V model (3)
Business Requirements
Tests
Acceptance Testing Integration Testing in the Large System Testing
Tests
Project Specification
Tests
Tests
System Specification Design Specification
Design Tests
Nguyn t Thng
Integration Testing in the Small Component Testing
Run Tests
11
Tests
Code
Software Testing
V model advantages
test design finds faults faults found early are cheaper to fix most significant faults found first faults prevented, not built in no additional effort, re-schedule test design changing requirements caused by test design Early test design helps to build quality, stops fault multiplication
Nguyn t Thng Software Testing 12
Iterative model
The iterative development model breaks the project into small parts. Each part is subjected to multiple iterations of the waterfall model. At the end of each iteration, a new module is completed or an existing one is improved on. That module is integrated into the structure, and the structure is then tested as a whole.
Nguyn t Thng
Software Testing
13
Iterative model (2)
Nguyn t Thng
Software Testing
14
Iterative model advantages
Corrective actions can be taken at the end of each iteration. The iterative model is more flexible, it presents more opportunities to introduce change. Rework is accepted (not rapidly). The changes should be less widespread as the architecture stabilizes and ideally. When errors are found, they can be corrected at best real-time, at worst in the next iteration.
Nguyn t Thng Software Testing 15
Iterative model advantages (2)
Contrast this to the waterfall model, where software is often released with major defects--because it is too late in the lifecycle to rewrite, or redesign components. The complexity of implementing the system is never overwhelming. elements are designed, developed and integrated in iterations the developers get a chance to grow with the project
Nguyn t Thng Software Testing 16
Prototype model
The Prototyping Model is a Software/ systems development method in which a prototype (an early approximation of a final system or product) is built, tested, and then reworked as necessary until an acceptable prototype is finally achieved from which the complete system or product can now be developed.
Nguyn t Thng
Software Testing
17
Prototype model (2)
Nguyn t Thng
Software Testing
18
Prototype model (3)
Starts with only a general idea of user requirements, and develops working model of (part of) a final system. A prototype either contains portions of the system of most interest to the users, or is a small-scale working model of the entire system. After reviewing the prototype with the users, the developers refine and extend it. This process is continued until the final specifications.
Nguyn t Thng Software Testing 19
Prototype model advantages
The model can be used when the requirements cannot or will not be specified. The user can experiment with the system to improve the requirements. Speeds up the development approach. Useful where specifications cannot be developed in advance AI system.
Nguyn t Thng
Software Testing
20
Prototype model drawbacks
The prototype model can lead to poorly designed systems. The prototypes are usually built without regard to how they might be used later, so attempts to reuse them may result in inefficient systems. This model emphasizes refining the requirements based on customer feedback, rather than ensuring a better product through quick change based on test feedback.
Nguyn t Thng Software Testing 21
Agile model
Agile methodology was developed to respond to changes quickly and smoothly. Agile methodology is a collection of values, principles, and practices that incorporates iterative development, test, and feedback into a new style of development.
Nguyn t Thng
Software Testing
22
Agile model (2)
Nguyn t Thng
Software Testing
23
Agile is difference
Iterative: Entire application is distributed in incremental units called as iteration. Development time of each iteration is small (couple of weeks), fixed and strictly adhered to. Every Iteration is a mini increment of the functionality and is build on top of previous iteration.
Nguyn t Thng
Software Testing
24
Agile is difference (2)
Active Customer involvement: There is lot of client involvement and faceto-face interaction. Every iteration is tested and approved by client. The feedback obtained is implemented in subsequent iterations; thus minimizing risk and ensuring higher client satisfaction.
Nguyn t Thng
Software Testing
25
Agile is difference (3)
Feature driven: More emphasis is on providing the required features in the application. 80/20 principle is applied to decide the 20% features which would be used 80% of the time. Fixed Time: Each iteration has a fixed time span in which it is delivered.
Nguyn t Thng
Software Testing
26
Agile is difference (4)
Priority based delivery: Features are prioritized depending on customer need, development risk etc. High priority features are developed first. After every iteration, the project priorities are re-evaluated.
Nguyn t Thng
Software Testing
27
Agile is difference (5)
Adaptive: The methodology in general is very adaptive, so that the application that is developed can cater to inflow of new requirements throughout its development. Goal is not to remove the uncertainty in the very beginning, but is to adapt to the changing needs.
Nguyn t Thng
Software Testing
28
Agile is difference (6)
Empowered Teams: The project teams are generally small and have lot of interaction and communication. Since entire team is actively involved, team is empowered to take decisions. No separate team to manage project.
Nguyn t Thng
Software Testing
29
Agile is difference (7)
People Centric: More emphasis is on using the adequately skilled people to do the development than on following the processes. The documentation and other nondevelopment activities are minimized and more time is devoted to development and testing.
Nguyn t Thng
Software Testing
30
Agile is difference (8)
Rapid development: Generally the development is done rapidly using light weight development technologies. More disciplined: Being rapid, every thing has to be delivered correctly first time. Thus, it requires highly skilled and organized team members. Simplicity: Emphasis is on keeping things as simple as possible and being open to change.
Nguyn t Thng Software Testing 31
Benefits to the Customer
Customer is more actively involved, and gets higher priority He gets to know regular and frequent status of the application Requirements are accepted after each iteration Since the methodology emphasizes rapid delivery, time-to-market is less. So the key functionalities can be available to use sooner.
Nguyn t Thng Software Testing 32
Benefits to the Customer (2)
Delivery is defined by fixed timescale. So customer is assured of receiving some functionality by a fixed time period. More Testing is done, so better software quality is delivered
Nguyn t Thng
Software Testing
33
Benefits to the Teams
Project teams are involved more actively in all the stages, have to ask right question. The teams collaboratively take the decisions and are more empowered. Since the development is Incremental, teams can focus on the specific requirements at any given point of time. More emphasis is on developing the application, and not on documentation. Simple and minimal documents are used to exchange the views
Nguyn t Thng Software Testing 34
Benefits to the Teams (2)
The teams receive frequent feedback as the testing is integrated; so the rework is reduced Less time is spent in gathering requirements as all the requirements are not gathered upfront and are implemented as and when they arise. So less time is required for planning. Less cost of development as rework, management, documentation. Teams are more collaborative.
Nguyn t Thng Software Testing 35
Agile comparison
Parameter Requirements Time & People Customer Involvement Negotiable Testing Feedback Concentration on Focus Stages Traditional Fixed May vary Before, After Estimates After code After Processes; reviews Plan driven Agile Evolve Fixed During Schedule Integrated During Workable software Value driven
(Plan-do-adapt)* Requirements, Design, Code, Test, Feedback
Software Testing 36
Nguyn t Thng
Challenges in Agile
Agile is difficult It Requires more TESTING & active CUSTOMERS involvement It impacts Management more than Developers. Management had to be more open, be actively involved in development process and more importantly allow the teams to take decisions.
Nguyn t Thng
Software Testing
37
Challenges in Agile (2)
Agile is More disciplined The code may be integrated continuously, sometime after every update in source code repository. To ensure the application is always in workable state, all the code has to work fine always. Higher technical and managerial expertise is needed. Each feature has to be completed before moving on to the next. Needs teams and self-discipline
Nguyn t Thng Software Testing 38
Challenges in Agile (3)
More Planning is needed Since the planning is done frequently (for each iteration), and the plan is updated as and when needed more focused planning needs to be done. The plan has to be adaptive to meet the changing requirements.
Nguyn t Thng
Software Testing
39
Questions on Methodologies
You have to learn the rules of the game. And then you have to play better than anyone else.
(Albert Einstein)
Nguyn t Thng
Software Testing
40