Professional Documents
Culture Documents
Unit 4 Software Engineering-204
Unit 4 Software Engineering-204
COURSE : BCA
SEMESTER : FOURTH SEMESTER
SUBJECT CODE : BCA-204
NAME OF SUBJECT : S/W ENGINEERING
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
UNIT-4
CODE REVIEW
Code Review is a systematic examination, which can find and remove the
vulnerabilities in the code such as memory leaks and buffer overflows.
Technical reviews are well documented and use a well-defined defect detection
process that includes peers and technical experts.
•It is ideally led by a trained moderator, who is NOT the author.
•This kind of review is usually performed as a peer review without management
participation.
•Reviewers prepare for the review meeting and prepare a review report with a list
of findings.
•Technical reviews may be quite informal or very formal and can have a number of
purposes but not limited to discussion, decision making, evaluation of alternatives,
finding defects and solving technical problems.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
•Test Schedule
•Approval workflows
•Entry/Exit criteria
2: Test Design
Now that you have a strategy and a plan, the next step is to dive into creating a test
suite. A test suite is a collection of test cases that are necessary to validate the
system being built, against its original requirements.
Test design as a process is an amalgamation of the Test Manager’s experience of
similar projects over the years, testers’ knowledge of the system/functionality being
tested and prevailing practices in testing at any given point. For instance, if you
work for a company in the early stages of a new product development, your focus
will be on uncovering major bugs with the alpha/beta versions of your software,
and less on making the software completely bug-proof.
The product may not yet have hit the critical “star” or “cash cow” stages of its
existence—it’s still a question mark. And you probably have investors backing you,
or another product of your own that is subsidising this new initiative.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
3: Test Execution
You can execute tests in many different ways—as single, waterfall SIT (System
Integration Test) and UAT (User Acceptance Test) phases; as part of Agile sprints;
supplemented with exploratory tests; or with test-driven development. Ultimately,
you need to do adequate amount of software testing to ensure your system is
(relatively) bug-free.
Let’s set methodology aside for a second, and focus on how you can clock adequate
testing. Let’s go back to the example of building a mobile app that can be supported
across operating systems, OS versions, devices. The most important question that
will guide your test efforts is “what is my test environment?”.
You need to understand your test environment requirements clearly to be able to
decide your testing strategy. For instance, does your app depend on integration with
a core system back end to display information and notifications to customers? If yes,
your test environment needs to provide back end integration to support meaningful
functional tests.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
4: Test Closure
Right—so you have done the planning necessary, executed tests and now want to
green-light your product for release. You need to consider the exit criteria for
signalling completion of the test cycle and readiness for a release. Let’s look at the
components of exit criteria in general:
100% requirements coverage: all business and technical requirements have to be
covered by testing.
Minimum % pass rate: targeting 90% of all test cases to be passed is best practice.
All critical defects to be fixed: self-explanatory. They are critical for a reason.
As a rule of thumb, I’ve seen projects mandate 90% pass rate and all critical
defects being fixed before the team can move on to the next phase of the project.
And on big transformation initiatives, I’ve seen individual releases move to the
next phase (to aid beta pilots) with as little as 80%, with the understanding that the
product won’t reach the customer until mandatory exit criteria are met. Ultimately,
what works for your team is down to your circumstances and business demands.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Types of Testing
Introduction:-
Testing is the process of executing a program with the aim of finding errors. To
make our software perform well it should be error-free. If testing is done
successfully it will remove all the errors from the software.
Principles of Testing:-
(i) All the test should meet the customer requirements
(ii) To make our software testing should be performed by a third party
(iii) Exhaustive testing is not possible. As we need the optimal amount of testing
based on the risk assessment of the application.
(iv) All the test to be conducted should be planned before implementing it
(v) It follows the Pareto rule(80/20 rule) which states that 80% of errors come from
20% of program components.
(vi) Start testing with small parts and extend it to large parts.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Functional Testing
FUNCTIONAL TESTING is a type of software testing that validates the software
system against the functional requirements/specifications. The purpose of
Functional tests is to test each function of the software application, by providing
appropriate input, verifying the output against the Functional requirements.
Functional testing mainly involves black box testing and it is not concerned about
the source code of the application. This testing checks User Interface, APIs,
Database, Security, Client/Server communication and other functionality of the
Application Under Test. The testing can be done either manually or using
automation.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
STRUCTURAL TESTING
Structural Testing: White box testing technique which takes into account the
internal structure of a system or component and ensures that each program
statement performs its intended function. It is usually performed by the software
developers. Structural testing, also known as glass box testing or white box testing
is an approach where the tests are derived from the knowledge of the software's
structure or internal implementation.
The other names of structural testing includes clear box testing, open box testing,
logic driven testing or path driven testing.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Mutation Testing:
Mutation Testing is a type of Software Testing that is performed to design new
software tests and also evaluate the quality of already existing software tests.
Mutation testing is related to modification a program in small ways. It focuses to
help the tester develop effective tests or locate weaknesses in the test data used for
the program.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Testing Activities
Testing is a process rather than a single activity.Testing must be planned and it
requires discipline to act upon it.The quality and effectiveness of software testing
are primarily determined by the quality of the test processes used.
The activities of testing can be divided into the following basic steps:
•Planning and Control
•Analysis and Design
•Implementation and Execution
•Evaluating exit criteria and Reporting
•Test Closure activities
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Unit Testing
Unit testing ensures that each part of the code developed in a component delivers
the desired output. In unit testing, developers only look at the interface and the
specification for a component. It provides documentation of code development as
each unit of the code is thoroughly tested standalone before progressing to another
unit. Unit tests support functional tests by exercising the code that is most likely to
break. If you use functional tests without unit tests, you may experience several
smells:
•It’s hard to diagnose failed tests
•Test fixtures work around known issues rather than diagnosing and fixing them
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Integration Testing
INTEGRATION TESTING is defined as a type of testing where software
modules are integrated logically and tested as a group. A typical software project
consists of multiple software modules, coded by different programmers. The
purpose of this level of testing is to expose defects in the interaction between these
software modules when they are integrated
Integration Testing focuses on checking data communication amongst these
modules. Hence it is also termed as 'I & T' (Integration and Testing), 'String
Testing' and sometimes 'Thread Testing'.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Exit Criteria:
•Successful Testing of Integrated Application.
•Executed Test Cases are documented
•All High prioritized bugs fixed and closed
•Technical documents to be submitted followed by release Notes.
Best Practices/ Guidelines for Integration Testing
•First, determine the Integration Test Strategy that could be adopted and later
prepare the test cases and test data accordingly.
•Study the Architecture design of the Application and identify the Critical
Modules. These need to be tested on priority.
•Obtain the interface designs from the Architectural team and create test cases to
verify all of the interfaces in detail. Interface to database/external
hardware/software application must be tested in detail.
•After the test cases, it's the test data which plays the critical role.
•Always have the mock data prepared, prior to executing. Do not select test data
while executing the test cases.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
System Testing
SYSTEM TESTING is a level of testing that validates the complete and fully
integrated software product. The purpose of a system test is to evaluate the end-to-
end system specifications. Usually, the software is only one element of a larger
computer-based system. Ultimately, the software is interfaced with other
software/hardware systems. System Testing is actually a series of different tests
whose sole purpose is to exercise the full computer-based system.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
System testing falls under Black box testing as it includes testing of the external
working of the software. Testing follows user's perspective to identify minor
defects.
System Testing includes the following steps.
Verification of input functions of the application to test whether it is producing the
expected output or not.
Testing of integrated software by including external peripherals to check the
interaction of various components with each other.
Testing of the whole system for End to End testing.
Behavior testing of the application via auser's experience
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Performance Testing
Performance Testing is a software testing process used for testing the speed,
response time, stability, reliability, scalability and resource usage of a software
application under particular workload. The main purpose of performance testing is
to identify and eliminate the performance bottlenecks in the software application. It
is a subset of performance engineering and also known as “Perf Testing”.
The focus of Performance Testing is checking a software program's
Speed - Determines whether the application responds quickly
Scalability - Determines maximum user load the software application can handle.
Stability - Determines if the application is stable under varying loads
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Identify the performance acceptance criteria - This includes goals and constraints for
throughput, response times and resource allocation. It is also necessary to identify project
success criteria outside of these goals and constraints. Testers should be empowered to set
performance criteria and goals because often the project specifications will not include a wide
enough variety of performance benchmarks. Sometimes there may be none at all. When
possible finding a similar application to compare to is a good way to set performance goals.
Plan & design performance tests - Determine how usage is likely to vary amongst end users
and identify key scenarios to test for all possible use cases. It is necessary to simulate a
variety of end users, plan performance test data and outline what metrics will be gathered.
Configuring the test environment - Prepare the testing environment before execution. Also,
arrange tools and other resources.
Implement test design - Create the performance tests according to your test design.
Run the tests - Execute and monitor the tests.
Analyze, tune and retest - Consolidate, analyze and share test results. Then fine tune and test
again to see if there is an improvement or decrease in performance. Since improvements
generally grow smaller with each retest, stop when bottlenecking is caused by the CPU. Then
you may have the consider option of increasing CPU power.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
ERROR SEEDING
Error Seeding is the process of deliberately introducing errors within a program to
check whether the test cases are able to capture the seeded errors. This technique
aims to detect errors in order to find out the ratio between the actual and artificial
errors. Mills’error seeding model proposed an error seeding method to estimate
the number of errors in a program by introducing seeded errors into the program.
From the debugging data, which consist of inherent errors and induced errors, the
unknown number of inherent errors could be estimated. If both inherent errors and
induced errors are equally likely to be detected, then the probability of k induced
errors in r removed errors follows a hypergeometric distribution which is given by
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Drawbacks:
1. It is expensive to conduct testing of the software and at the same time, it
increases the testing effort.
2. This method was also criticized for its inability to determine the type, location,
and difficulty level of the induced errors such that they would be detected
equally likely as the inherent errors.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
DEBUGGING ACTIVITIES
Debugging Process:
Steps involved in debugging are:
•Problem identification and report preparation.
•Assigning the report to software engineer to the defect to verify that it is genuine.
•Defect Analysis using modeling, documentations, finding and testing candidate
flaws, etc.
•Defect Resolution by making required changes to the system.
•Validation of corrections.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Debugging Strategies:
•Study the system for the larger duration in order to understand the system. It helps
debugger to construct different representations of systems to be debugging depends
on the need. Study of the system is also done actively to find recent changes made
to the software.
•Backwards analysis of the problem which involves tracing the program backward
from the location of failure message in order to identify the region of faulty code. A
detailed study of the region is conducting to find the cause of defects.
•Forward analysis of the program involves tracing the program forwards using
breakpoints or print statements at different points in the program and studying the
results. The region where the wrong outputs are obtained is the region that needs to
be focused to find the defect.
•Using the past experience of the software debug the software with similar
problems in nature. The success of this approach depends on the expertise of the
debugger.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Debugging Tools:
Debugging tool is a computer program that is used to test and debug other
programs. A lot of public domain software like gdb and dbx are available for
debugging. They offer console-based command line interfaces. Examples of
automated debugging tools include code based tracers, profilers, interpreters, etc.
Some of the widely used debuggers are:
•Radare2
•WinDbg
•Valgrind
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
MANAGEMENT OF MAINTENANCE
Software Maintenance is the process of modifying a software product after it has
been delivered to the customer. The main purpose is to modify and update software
application after delivery to correct faults and to improve performance.
Maintenance management – The versions, semi-versions and patch management
are added with the configuration management an then maintenance is carried out.
Need for Maintenance –
Software Maintenance must be performed in order to:
1. Correct faults.
2. Improve the design.
3. Implement enhancements.
4. Interface with other systems.
5. Accommodate programs so that different hardware, software, system features,
and telecommunications facilities can be used.
6. Migrate legacy software.
7. Retire software.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Perfective maintenance:
A software product needs maintenance to support the new features that the users
want or to change different types of functionalities of the system according to the
customer demands.
Preventive maintenance:
This type of maintenance includes modifications and updations to prevent future
problems of the software. It goals to attend problems, which are not significant at
this moment but may cause serious issues in future.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
•The process acceptance of the modification, by confirming the modified work with
the individual who submitted the request in order to make sure the modification
provided a solution.
•The migration process (platform migration, for example) is exceptional, and is not
part of daily maintenance tasks. If the software must be ported to another platform
without any change in functionality, this process will be used and a maintenance
project team is likely to be assigned to this task.
•Finally, the last maintenance process, also an event which does not occur on a
daily basis, is the retirement of a piece of software.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Reverse Engineering
It is a process to achieve system specification by thoroughly analyzing,
understanding the existing system. This process can be seen as reverse SDLC
model, i.e. we try to get higher abstraction level by analyzing lower abstraction
levels.
An existing system is previously implemented design, about which we know
nothing. Designers then do reverse engineering by looking at the code and try to
get the design. With design in hand, they try to conclude the specifications. Thus,
going in reverse from code to system specification.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Software Re-engineering
When we need to update the software to keep it to the current market, without
impacting its functionality, it is called software re-engineering. It is a thorough
process where the design of software is changed and programs are re-written.
Legacy software cannot keep tuning with the latest technology available in the
market. As the hardware become obsolete, updating of software becomes a
headache. Even if software grows old with time, its functionality does not. For
example, initially Unix was developed in assembly language. When language C
came into existence, Unix was re-engineered in C, because working in assembly
language was difficult. Other than this, sometimes programmers notice that few
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Re-Engineering Process
1. Decide what to re-engineer. Is it whole software or a part of it?
2. Perform Reverse Engineering, in order to obtain specifications of existing
software.
3. Restructure Program if required. For example, changing function-oriented
programs into object-oriented programs.
4. Re-structure data as required.
5. Apply Forward engineering concepts in order to get re-engineered software.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Configuration Identification:
Configuration identification is a method of determining the scope of the software
system. With the help of this step, you can manage or control something even if
you don't know what it is. It is a description that contains the CSCI type (Computer
Software Configuration Item), a project identifier and version information.
Activities during this process:
•Identification of configuration Items like source code modules, test case, and
requirements specification.
•Identification of each CSCI in the SCM repository, by using an object-oriented
approach
•The process starts with basic objects which are grouped into aggregate objects.
Details of what, why, when and by whom changes in the test are made
•Every object has its own features that identify its name that is explicit to all other
objects
•List of resources required such as the document, the file, tools, etc.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Test Documentation
Test documentation is documentation of artifacts created before or during the
testing of software. It helps the testing team to estimate testing effort needed, test
coverage, resource tracking, execution progress, etc. It is a complete suite of
documents that allows you to describe and document test planning, test design, test
execution, test results that are drawn from the testing activity.
The degree of test formality depends on
•The type of application under test
•Standards followed by your organization
•The maturity of the development process.
Testing activities generally consume 30% to 50% of software development project
effort. Documentations help to identify Test process improvement that can be
applied to future projects.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
For a newbie, it's easy to assume that Testing is executing the various section of
code on an ad-hoc basis and verifying the results. But in the real world, Testing is
a very formal activity and is documented in detail. Test Documentation makes
planning, review, and execution of testing easy as well as verifiable.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)