Software Engineering 2
Software Engineering 2
■■■■■■■■■■■■(CHAPTER-1 introduction to software Engineering)■■■■■ ■■■■■■■■■ SDLC Phases:(8M-2012)(7M-2013)(15M-2014) WATERFALL MODEL: (8M-2011)(10M-2013)(10M-2016)
SOFTWARE: (2Marks-2013)(2M-2014) The SDLC framework consists of series of phases (or steps) that are intended to be followed in This model is also referred as Linear Sequential Model or Classical Life Cycle Model.
sequence by software or system designers and develops. Waterfall Model is a software life-cycle or product life-cycle model, in which development is
Software is the collection of computer programs, procedure rules and associated documentation
The entire software development life cycle can be classified into seven phases supposed to proceed linearly through requirements analysis, design, implementation, testing
and data.
(validation), integration and maintenance.
Software is a set of instructions used to acquire inputs and to manipulate them to produce the
1. Feasibility study: in this phase the design and development team becomes clear with the project
desired output in terms of functions and performance as determined by the user of the
objectives and their work preview
software.
2. Requirement Analysis: In this stage, the requirements are studied and analyzed. The technical
development team works with customers and system end users to identify the application domain,
♥ SOFTWARE ENGINEERING: (2M-2011)(2M-2012)(2M-2013)(2M-2015)
functions, services performance capabilities, hardware constraints related to the system to be
Software engineering is the systematic approach to the development, operation and maintenance
developed
of a software product.
Software engineering is systematic development, management and evaluation of software 3. System Design: In this phase, a new system is designed according to the needs of users
systems. It is concerned with the application of engineering concepts, techniques and methods to 4. Development: This is the phase where the system is actually developed
the development of software.
5. Testing: this is most important phase under all kinds of situations and environment to test its
Goals of software Engineering: (2M-2012) performance, During this phase entire project functionally is tested
The goal of software engineering is to create practical software systems that have social and /or 6. Implementation: This is the process in which the developed system is handed over to the client.
economic value using a systematic software development process. And all the end users are trained to manage and maintain the new systems
To improve the efficacy and quality of software product. 7. Software Maintenance: this is the phase wherein the development team maintains the system
The get the ability to develop and maintain software becoming more and more complex. for the client.
2. System and Software Design: Software design representing the software system functions in a
There are two types of software products:
form that may be transformed into one or more executable programs.
1. Generic products
3. Implementation and Unit Testing: The system is divided in modules/ units. Each unit is
2. Bespoke (or customized ) products
developed and tested for its functionality, this is referred to as unit testing.
Generic Product Customized Product 4. Integration and system Testing: The system is first divided into units which are developed and
Generic Products are developed for anonymous The customized products are developed for tested for their functions. These units are integrated into a complete system and tested to
customers. specific customers. check if all modules/units coordinate with each other, and the system behaves as per the
For the generic products, the organization which For custom products, the specification is usually specifications. After successfully testing the software, it is delivered to the customer.
develops the software product controls the developed and controlled by the organizations
5. Operations and Maintenance: Maintenance involves correcting errors which were not discovered
software specification. who are buying the software.
in earlier stages of the life cycle, improving the implementation of system.
The target is generally the entire world and The specific product is designed and developed
many copies are expected to be sold. as per customer requirements.
Examples: operating systems, compilers, Examples: Payroll System, Inventory Systems
Advantages of the Waterfall Model:
analyzers, word processors. etc. Different types of SDLC Models: Easy to understand and implement.
Widely used and known (in theory).
1. Waterfall model 2. Spiral model It allows for communication between customer and developer and specifies what will be
SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC): (2M-2014)(10M-2015)
3. Prototype model 4. Iterative mode delivered when and at what cost
SDLC describes a process used by engineers and analysts to develop and deploy all aspects of an
5. Component based software engineering 6. Incremental mode
information system. Disadvantages of the Waterfall Model:
7. Rapid application development model (RAD) 8. Evolutionary development
SDLC is sequence of activities carried out by analyst, designer, and user to develop and The waterfall model requires the user to define system requirements early in the project.
implement an information system. These activities are carried out in different stages.
1. Objective Setting: Specific objective for that phase of the project are defined. Constraints on
♥ RISK MANAGEMENT:(2M–2012)(2M-2013)(2M-2014)(5M-2015)(5M-2016)
the process and product are identified and a detailed management plan is drawn up.
Risk management is to expect risks that might affect the project schedule or the quality of the
2. Risk Assessment and risk reduction: For each of the identified project risks, a detailed analysis software being developed and taking action to avoid these risks.
is carried out. Steps are taken to reduce the risk Risk Management is a process that is used to minimize risk before it can harm the productivity
3. Development and validation: After risk evaluation, a development model for the system is of a software project.
chosen. There are several types of risk that can occur during a software development project. These
include
4. Planning: The project is reviewed and a decision made whether to continue with a further loop of
the spiral. If it is decided to continue, plans are drawn up for the next phase of the project. Risk Type Description
Generic threats across all projects, For example, requirements change,
Generic Risks
Advantage of Spiral model: loss of team members, loss of funding.
High level risks associated with the type of product being developed. For The phases of the system engineering process are:
High amount of risk analysis Product-Specific Risks
Good for large and mission – critical projects example: Availability of testing resources. System requirement definition. System design process.
Spiral Life Cycle Model is one of the most flexible SDLC models in place. Project Risks Affect project schedule of resource Sub-system development. System integration.
Project monitoring is very easy and effective. Each phase and each loop requires a review from Product Risks Affect quality or performance of software System installation. System evolution.
concerned people. Business Risk Affect the viability of the software. System decommissioning. System operation.
It is suitable for high risk projects, where business needs may be unstable.
There are also specific risks associated with team members, customers, tools, technology, time
A highly customized product can be developed using this
estimation and team size.
Data flow models shows how data is processed through a sequence as it moves through the SOFTWARE PROTOTYPING: Leads to implementing and then repairing way of building systems.
system. Data Flow Diagrams (DFDs) may be used to model the system‟s data processing. Practically, this methodology may increase the complexity of the system
Prototyping is important technique to reduce the cost and risk in developing complex software
Data Flow Diagram (DFD) is a representation of a system functions. Data flow diagrams (also Too much involvement of client is not always preferred by the developer
system Too many changes can disturb the rhythm of the development team.
called data flow graphs) are commonly used during problem analysis.
Prototyping is a technique for providing a reduced functionality or a limited performance version
Data flow diagram is graphical representation of flow of data in an information system. Sometimes leads to incomplete documentation.
of software system early in its development
Types of DFD: Data Flow Diagrams are either Logical or Physical. ♥ PROTOTYPING MODEL: (2M-2012)(2M-2013)(2M-2014)(5M-2015)
♥ TYPES OF PROTOTYPING Approach: (7M-2011)(8M-2012)(5M-2013)(5M-2014)
Logical DFD – This type of DFD concentrates on the system process and flow of data in the Prototyping begins with requirements gathering. Developer and customers meet and define the
system. For example in a Banking Software system, how data is moved between different overall objectives of the software.
entities. This model an attempt to increase the flexibility of the development process by allowing the 1) Evolutionary Prototyping: (6M-2016)
Physical DFD – This type of DFD shows how the data flow is actually implemented in the client to interact with a working representation of the product Evolutionary Prototyping is a life cycle model in which the system is developed in increments and
system. It is more specific and close to the implementation. The Prototyping Model is a Systems Development Method (SDM) in which a Prototype is built, frequently modified and add new features as per to end-user and customer feedback.
tested, and then reworked as necessary unit The evolutionary approach aims to develop a system through a series of prototype iterations.
Symbol Functions By using prototyping, the client can get better understand the requirements of the system
Entities - Entities are source and destination of information data.
Entities are represented by a rectangle with their respective name.
Object: A function-oriented design strategy relies on decomposing the system into a set of interacting functions They are easy to learn and use. Users without experience can learn to use the system.
An object is an entity that has a state and a defined set of operations that operate on with a centralized system state shared by these functions as shown in below figure. The user may switch quickly from one task to another and can interact with several different
that state. The state is represented as a set of object attributes. The operations applications.
associated with the object provide services to other objects (clients) that request these Fast, full-screen interaction is possible anywhere on the screen.
services when some computation is required.
Mean Time To Repair [MTTR] Mistake: it is a human action that produces an incorrect result
Once the failure occurs, some time is required to fix the error that is nothing but mean time to
Error: an error is mistake, misunderstanding on the part of a software developer
repair. Metrics measured the average time is takes to track the error, causing the failure and
then fix it. there are 3 types of errors:
Example: When power supply suddenly goes, the computer is off by aborting the current Syntactical error: it is deviation from the syntax of program.
operation. Since the current process is managed by operating systems. Therefore next-time Logical error: it is deviation from logic of the program.
The model explains that as the errors are repaired
when the computer is on the operating system may show the problems during loading. Such Executional error: this occurs during execution of the program.
the average improvement in reliability per repair
problems of operating system can be measured by MTTR metrics.
decreases. Failures:
Mean Time Between Failure: (MTBF)
This metrics is the combination of MTTF and MTTR. Thus as MTBF of 300 Hours indicates that During execution of a software component or system, a tester, developer, or user observes
PROGRAMMING FOR RELIABILITY: (2M-2011)(2M-2015)
once the failure occurs the next failure is expected to occur only after 300 hours. In this case that it does not produce the expected results.
the time measure is real time and not as indicated in MTTF. Reliability in a software system can be achieved using three strategies: In some cases a particular type of misbehavior indicates a certain type of fault is present.
Example: An operating system after its installation in computer has caused the problem after 1 Fault avoidance: This is the most important strategy, which is applicable to all types of system. Incorrect behavior can include producing incorrect values for output variables, an incorrect
year of its usage. It means the mean time between failure may be seen again in the next year. The design and implementation process should be organized with the objective of producing response on the part of a device, or an incorrect image on a screen.
fault-free systems. During development failures are usually observed by testers, and faults are located and
Probability of Failure on Demand [POFOD]
Fault tolerance: This strategy assumes that residual faults remain in the system. Facilities are repaired by developers.
Unlike the other metrics explained above this metrics does not explicitly involved in the time
measurements. POFOD metrics measures the likelihood of the system failing when a service provided in the software to allow operation to continue when these faults cause system failures.
Faults:
request is made. For instance a POFOD of 0.001 more than one (1) out of every 1000 service Fault detection and recovery: Faults are detected before the software is put into operation.
requests would result in a failure. The software validation process uses static and dynamic methods to discover any faults, which A fault (defect) is introduced into the software as the result of an error.
Example: It can be understood by a simple example of copy process from a CD. If a file in a CD remain in a system after implementation. Faults or defects are sometimes called “bugs.” Use of the term “defect” is also associated
is copied to hard disk for 10 times. It may yield a problem during any one of these attempts. with software artifacts such as requirements and design documents.
Application System Reuse: There are two types: 1) COTS Product Reuse 2) Software product lines Defects occurring in these artifacts are also caused by errors and usually detected in the
AVAIL: (Availability)
review process.
The availability of systems is a measure of how well the system is available for the use over a COST Product Reuse: (2M-2016)
given time. AVAIL metrics not only consider the number of failure occurring during a time. It Defect:
A commercial-off-the-shelf (COTS) Product is a software system that can be used without change by
also takes into account the repair time of the systems when the failure occurs.
its buyer. Virtually all desktop software and a wide variety of server products are COTS software. Mismatch between the requirements. If something is happening with the functionality that is
Example: This metrics is important for the systems such as telecommunication and operating
systems which are supposed to be never down and where repair and restart time are significant Because this software is designed for general use, it usually includes many feature and functions so has not mentioned in any document to be followed during implementation or testing then it is a
and loss of that service time is important. the potential to be reused in different applications and environments. defect.
Software Engineering 28 Software Engineering 29 Software Engineering 30
TEST PROCESS: (5M-2011)(6M-2014)(7M-2015) ♥ TEST PLAN ( TEST PLAN TEMPLATE ): (7M-2011)(8M-2012)(6M-2013)(9M-2014)(8M-2015) Test Environment:
The test plan is the document which is created before the testing process. it includes the type Specify the properties of test environment: hardware, software, network etc.
of testing that will be performed, high level scope of the project, the environmental List any testing or related tools.
requirements of the testing process, what automated testing tools will be used (if available), the Estimate:
Provide a summary of test estimates (cost or effort) and/or provide a like to the detailed
schedule of each test, when it will start and end etc.
estimation.
TEST PLAN TEMPLATE Schedule:
The format and content of a software test plan vary depending on the processes, standards, and Provide a summary of the schedule, Specifying key test milestones, and/or provide a link to
test management tools being implemented. Nevertheless, the following format, which is based on the detailed schedule.
IEEE (Institute of Electrical & Electronics Engineering) standard for software test documentation, Staffing and Training Need:
provides a summary of what a test plan can/should contain. Specify staffing needs by role and required skills.
Identify training that is necessary to provide those skills, if not already acquired.
Test Plan Identifier: Responsibilities:
Provide a unique identifier for the document. (Adhere to the configuration management List the responsibilities of each team/role/individual.
system if we have one) Risks:
Introduction: List the risks that have been identified.
Provide an overview of the test plan. Specify the mitigation plan and the contingency plan for each risk.
Specify the goals/objective. Assumptions and Dependencies:
The stages in testing process are:
Specify any constraints. List the assumptions that have been made during the preparation of this plan.
1. Unit Testing: List the dependencies.
References:
Individual components are tested to ensure that they operate correctly. Each component is List the related documents, with links to them if available, including the following. Approvals:
tested independently, without referring other system components. o project plan Specify the names and roles of all persons who must approve the plan.
o configuration Management plan Provide space for signatures and dates. (if the document is to be printed.)
2. Module Testing: Test items:
A module is a collection of dependent components such as an object class, an abstract data type List the test item (software/products) and their versions. TVERIFICATION AND VALIDATION: (2M-2011)(2M-2013)
or some collection of procedures and functions. A module encapsulates related components so Features to be Tested:
that it can be tested without referring other system modules. List the features of the software/product to be tested. Criteria Verification Validation
Provide references to the Requirements and/or Design specifications of the features to be The process of evaluation work- The process of evaluating software during
3. Sub-system Testing [Integration Testing]: tested products (not the actual final product) or at the end of the development process to
Testing collection of modules which have been integrated into sub-systems. Features Not to Be Tested: Definitionof a development phase to determine determine whether it satisfies specified
List the features of the software/product which will not be tested. whether they meet the specified business requirement.
The most common problems which arise in large software system are sub-system interface
Specify the reasons these features won‟t be tested. requirements for that phase.
mismatches.
Approach: To ensure that the product is being To ensure that the product actually meets
The sub-system test process should concentrate on the detection of interface errors.
Mention the overall approach to testing. Objective built according to the requirements and the user's needs, and that thespecifications
4. System Testing:
Specify the testing levels[if it‟s Master Test Plan], the testing types, and the testing design specification were correct in the first place.
The sub-systems are integrated to make-up the entire system. The testing process is concerned methods [Manual/Automated; White Box/Black Box/Gray Box] Question Are we building the product right? Are we building the right product?
with finding errors that result from unexpected interactions between sub-systems and system Item Pass/Fail Criteria: Evaluation Plans, Requirement Specs, Design Specs, The actual product/software
components. Specify the criteria that will be used to determine whether each test item items Code, Test Cases
(software/product) has passed or failed testing. Activities -Reviews -Walkthroughs -Inspection -Testing
5. Acceptance Testing: Suspension Criteria and Resumption Requirements:
This is the final stage in the testing process before the system is accepted for operational use. Specify criteria to be used to suspend the testing activity.
TEST CASE: (2M-2012)(2M-2015)
The system is tested with data supplied by the client rather than simulated test-data. Specify testing activities which must be redone when testing is resumed.
Test Deliverables: Test case is a scenario made up of a sequence of steps and conditions or variables, where test
List test deliverables, and links to them if available, including the following: inputs are provided and the program is run using those inputs, to see how it performs. An
o Test Plan (this document itself) expected result is outlined and the actual result is compared to it.
o Test Cases
o Test Scripts Test case can be divided into three main parts:
o Defect/Enhancement Logs 1) Information 2) Activities 3) Results
o Test Reports ___________________________________________________________________________________________________________________________________________________________________________
Tests are done from a user‟s point of view and will help in exposing discrepancies in the DIFFERENCE BETWEEN WHITE-BOX AND BLACK-BOX TESTING: (5M-2012)(5M- The QC system is designed to:
specifications. 2013)(5M-2014) 1. Provide routine and consistent checks to ensure data integrity, correctness, and
Tester need not know programming languages or how the software has been implemented
Black Box Testing White Box Testing Completeness;
Test cases can be designed as soon as the specifications are complete
Black Box Testing is a software testing method White Box Testing is a software testing method 2. Identify and address errors and omissions;
More effective on larger units of code than white box testing
in which the internal structure/design/ in which the internal structure/design/ 3. Document and archive inventory material and record all QC activities.
Tester and programmer are independent of each other
implementation of the item being tested is implementation of the item being tested is known
Disadvantages of Black box Testing: NOT known to the tester to the tester. (-3-) Quality Planning: (2M-2016)
Mainly applicable to higher levels of testing: Mainly applicable to lower levels of testing unit: Quality planning establishes the design of a product, service or process that will meet
Only a small number of possible inputs can be tested and many program paths will be left customer requirements and operational needs to produce the product before it is produced.
acceptance Testing and System Testing. Testing, Integration Testing.
untested Quality planning follows a sequence of steps as follows.
Requirement Specifications Detail Design
Without clear and concise specifications, test cases are hard to design In white box testing we can test performance In white box testing we cannot test performance 1. Identify customers and target markets.
May leave many program paths untested of the application of the application 2. Discover hidden and unmet customer needs.
Generally black box testing will begin early in But for white box testing approach one has to 3. Translate their needs into product or service requirement:
the software development i.e. in requirement wait for the designing has to complete. 4. Develop a service on product that exceeds customers needs
gathering phase itself.