Module V
Module V
Topics
• Feature-Driven Development: Introduction, incremental software
development, Regaining Control, motivation behind FDD, planning an
iterative project, architecture centric, FDD and XP.
• Test Driven Development: Unit Tests, Integration Tests, End-to-End
Tests, Customer Tests.
• Release Management: Version Control, Continuous Integration
Incremental Software Development
• An incremental software development process is one that does not try to complete the
whole design task in one go.
Each iteration
1. Determines what will be done during the iteration.
2. Designs and implements the required functionality.
3. Tests the new functionality.
4. (Optionally) Creates a new release.
5. Reviews what has been done before moving to the next iteration
Incremental Software Development
Incremental Software Development
• Figure depicts the spiral nature of this approach to software development. here each
iteration around the spiral is a mini-software development project.
• The end result is that you incrementally produce the system being designed.
• While you do this, you explicitly identify the risks to your design/system upfront and deal
with them early on
• The iterations within XP projects tend to be between 1 and 3 weeks, with new releases at
the end of most iterations
• An iterative approach may still be relevant, but the iterations may be in terms of months
rather than weeks
Feature-Driven Development
• FDD stands for Feature-Driven Development. It is an agile iterative
and incremental model that focuses on progressing the features of the
developing software.
Disadvantages of FDD
• This agile practice is not good for smaller projects.
• There is high dependency on lead programmers, designers and mentors.
• There is lack of documentation which can create an issue afterwards
Regaining Control :The Motivation Behind FDD
• To manage such a project in an agile manner?
----------This is where feature-driven development will come-in.
Feature specifications
Bug fixing
Unsuccessful
Code change Run
Successful
Refactoring
Software
14
Test-Driven Development
• Developed software goes through a repeated maintenance process due to lack of
quality and inability to satisfy the customer needs.
• System functionality is decomposed into several small features.
• Test cases are designed before coding.
• Unit tests are written first for the feature specification and then the small source
code is written according to the specification.
• Source code is run against the test case.
• It is quite possible that the small code written may not meet the requirements, thus it
will fail the test.
• After failure, we need to modify the small code written before to meet the
requirements and run it again.
• If the code passes the test case implies the code is correct. The same process is
repeated for another set of requirements specification
Levels of Testing
• Testing is a defect detection technique that is performed at various levels. Testing
begins once a module is fully constructed.
• Although software engineers test source codes after it is written, but it is not an
appealing way that can satisfy customer’s needs and expectations.
• Software is developed through a series of activities, i.e., customer needs,
specification, design, and coding.
• Each of these activities has different aims. Therefore, testing is performed at
various levels of development phases to achieve their purpose.
Continue.. 16
Unit test
• Unit means a program unit, module, component, procedure, subroutine of a system
developed by the programmer.
• The aim of unit testing is to find bugs by isolating an individual module using test
stub and test drivers and by executing test cases on it.
• The unit testing is performed to detect both structural and functional errors in the
module.
• Therefore, test cases are designed using white-box and black-box testing strategies
for unit testing.
• Most of the module errors are captured through white-box testing
Unit test envirnoment
Integration Testing
• Top-down integration testing begins with the main module and move
downwards integrating and testing its lower level modules.
• Again the next lower level modules are integrated and tested.
• Thus, this incremental integration and testing is continued until all
modules up to the concrete level are integrated and tested.
• The top-down integration testing approach is as follows:
• main system -> subsystems -> modules at concrete level.
• In this approach, the testing of a module may be delayed if its lower
level modules (i.e., test stubs) are not available at this time.
• Thus, writing test stubs and simulating to act as actual modules may be
complicated and time-consuming task.
Integration Testing
Top-down approach
M
S1 S2 S3
Continue.. 23
Bottom-up approach
• As the name implies, bottom-up approach begins with the individual testing of
bottom-level modules in the software hierarchy.
• Then lower level modules are merged function wise together to form a
subsystem and then all subsystems are integrated to test the main module
covering all modules of the system.
• The approach of bottom-up integration is as follows:
concrete level modules -> subsystem –> main module.
• The bottom-up approach works opposite to the top-down integration
approach.
Sandwich approach
End to End Verification of a Gmail account will include the following steps:
1. Launching a Gmail login page through URL.
2. Logging into Gmail account by using valid credentials.
3. Accessing Inbox. Opening Read and Unread emails.
4. Composing a new email, reply or forward an email.
5. Opening Sent items and checking emails.
6. Checking emails in the Spam folder
7. Logging out of Gmail application by clicking ‘logout
Customer test/Acceptance Testing
•
Advantages of version control systems
• Using version control software is a best practice for high performing software and DevOps
teams.
• Version control also helps developers move faster and allows software teams to preserve
efficiency and agility as the team scales to include more developers.
• Version Control Systems (VCS) have seen great improvements over the past few decades and
some are better than others.
• VCS are sometimes known as SCM (Source Code Management) tools or RCS (Revision
Control System).
• One of the most popular VCS tools in use today is called Git. Git is a Distributed VCS, a
category known as DVCS
Main benefits you should expect from version control are
• A complete long-term change history of every file. This means every change made by
many individuals over the years. Changes include the creation and deletion of files as
well as edits to their contents.
• Different VCS tools differ on how well they handle renaming and moving of files.
This history should also include the author, date and written notes on the purpose of
each change.
• Having the complete history enables going back to previous versions to help in root
cause analysis for bugs and it is crucial when needing to fix problems in older
versions of software. If the software is being actively worked on, almost everything
can be considered an "older version" of the software
Advantages of version control systems
• Traceability: Being able to trace each change made to the software and connect it to
project management and bug tracking software such as Jira, and being able to annotate
each change with a message describing the purpose and intent of the change can help not
only with root cause analysis and other forensics.
• Having the annotated history of the code at your fingertips when you are reading the
code, trying to understand what it is doing and why it is so designed can enable
developers to make correct and harmonious changes that are in accord with the intended
long-term design of the system.
• This can be especially important for working effectively with legacy code and is crucial
in enabling developers to estimate future work with any accuracy.
Continuous Integration
• Continuous integration. New code is integrated and the system rebuilt every time a task is
completed (which may be many times a day).
• The aim when trying to implement “continuous integration” it not to integrate every 5 min,
but between one and several times per day.
• The aim is to avoid the problems encountered with big bang integrations. Big bang
integrations happen when a period of time (typically days or weeks rather than hours) has
elapsed. In many situations, the act of integrating all the code can take days in itself.
• In one project, the integration took a week just to get to the point that all the code compiled
(it had yet to be tested!). One developer, in particular, seemed to have gone off on their own
causing chaos.
• Big bang integrations slow development projects down and can help to create a culture of
blame.
Continous integration
The reason for regular integration (every few hours) is to help you find out: