Software Engineering
Software Engineering
Regression Testing is the process of testing the modified parts of the code and the
parts that might get affected due to the modifications to ensure that no new errors
have been introduced in the software after the modifications have been made.
Regression means return of something and in the software field, it refers to the
return of a bug.
When to do regression testing?
When a new functionality is added to the system and the code has been
modified to absorb and integrate that functionality with the existing code.
When some defect has been identified in the software and the code is
debugged to fix it.
When the code is modified to optimize its working.
Process of Regression testing:
Firstly, whenever we make some changes to the source code for any reasons like
adding new functionality, optimization, etc. then our program when executed fails in
the previously designed test suite for obvious reasons. After the failure, the source
code is debugged in order to identify the bugs in the program. After identification of
the bugs in the source code, appropriate modifications are made. Then appropriate
test cases are selected from the already existing test suite which covers all the
modified and affected parts of the source code. We can add new test cases if
required. In the end regression testing is performed using the selected test cases.
Techniques for the selection of Test cases for Regression Testing:
Select all test cases: In this technique, all the test cases are selected from
the already existing test suite. It is the most simple and safest technique but not
much efficient.
Select test cases randomly: In this technique, test cases are selected
randomly from the existing test-suite but it is only useful if all the test cases are
equally good in their fault detection capability which is very rare. Hence, it is not
used in most of the cases.
Select modification traversing test cases: In this technique, only those test
cases are selected which covers and tests the modified portions of the source
code the parts which are affected by these modifications.
Select higher priority test cases: In this technique, priority codes are
assigned to each test case of the test suite based upon their bug detection
capability, customer requirements, etc. After assigning the priority codes, test
cases with highest priorities are selected for the process of regression testing.
Test case with highest priority has highest rank. For example, test case with
priority code 2 is less important than test case with priority code 1.
Tools for regression testing: In regression testing, we generally select the test
cases form the existing test suite itself and hence, we need not to compute their
expected output and it can be easily automated due to this reason. Automating the
process of regression testing will be very much effective and time saving.
Most commonly used tools for regression testing are:
Selenium
WATIR (Web Application Testing In Ruby)
QTP (Quick Test Professional)
RFT (Rational Functional Tester)
Winrunner
Silktest
Advantages of Regression Testing:
It ensures that no new bugs has been introduced after adding new
functionalities to the system.
As most of the test cases used in Regression Testing are selected from the
existing test suite and we already know their expected outputs. Hence, it can be
easily automated by the automated tools.
It helps to maintain the quality of the source code.
Disadvantages of Regression Testing:
It can be time and resource consuming if automated tools are not used.
It is required even after very small changes in the code.
Testing is a process of executing a program with the aim of finding error. 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:-
1. Unit Testing
2. Integration Testing
The objective is to take unit tested components and build a program structure that
has been dictated by design.Integration testing is testing in which a group of
components are combined to produce output.
Integration testing are of two types: (i) Top down (ii) Bottom up
Example
(a) Black Box testing:- It is used for validation.
In this we ignores internal working mechanism and
focuses on what is the output?.
3. Regression Testing
Every time new module is added leads to changes in program. This type of testing
make sure that whole component works properly even after adding components to
the complete program.
Example
In school record suppose we have module staff, students
and finance combining these modules and checking if on
integration these module works fine is regression testing
4. Smoke Testing
This test is done to make sure that software under testing is ready or stable for
further testing
It is called smoke test as testing initial pass is done to check if it did not catch the fire
or smoked in the initial switch on.
Example:
If project has 2 modules so before going to module
make sure that module 1 works properly
5. Alpha Testing
6. Beta Testing
The beta test is conducted at one or more customer sites by the end-user of the
software. This version is released for the limited number of users for testing in real
time environment
Example:
When software testing is performed for the limited
number of people
7. System Testing
In this software is tested such that it works fine for different operating system.It is
covered under the black box testing technique. In this we just focus on required input
and output without focusing on internal working.
In this we have security testing, recovery testing , stress testing and performance
testing
Example:
This include functional as well as non functional
testing
8. Stress Testing
In this we gives unfavorable conditions to the system and check how they perform in
those condition.
Example:
(a) Test cases that require maximum memory or other
resources are executed
(b) Test cases that may cause thrashing in a virtual
operating system
(c) Test cases that may cause excessive disk requirement
9. Performance Testing
Debugging Strategies:
1. 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.
2. 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.
3. 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.
4. 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.
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
5.
The above formula is used for the cost estimation of for the basic COCOMO
model, and also is used in the subsequent models. The constant values a and b
for the Basic Model for the different categories of system:
SOFTWARE PROJECTS A B
Product Attributes
0.9
0.8
Hardware Attributes
0.9
Personnel attributes
1.1
1.1
1.1
1.1
1.0
Project Attributes
methods 0
1.1
1.0
SOFTWARE PROJECTS A B
To assess the quality of the engineered product or system and to better understand
the models that are created, some measures are used. These measures are collected
throughout the software development life cycle with an intention to improve the
software process on a continuous basis. Measurement helps in estimation, quality
control, productivity assessment and project control throughout a software project.
Also, measurement is used by software engineers to gain insight into the design and
development of the work products. In addition, measurement assists in strategic
decision-making as a project proceeds.
Software measurements are of two categories, namely, direct measures and indirect
measures. Direct measures include software processes like cost and effort applied
and products like lines of code produced, execution speed, and other defects that
have been reported. Indirect measures include products like functionality, quality,
complexity, reliability, maintainability, and many more.
Generally, software measurement is considered as a management tool which if
conducted in an effective manner, helps the project manager and the entire software
team to take decisions that lead to successful completion of the project.
Measurement process is characterized by a set of five activities, which are listed
below.
Note that collection and analysis activities drive the measurement process. In order
to perform these activities effectively, it is recommended to automate data collection
and analysis, establish guidelines and recommendations for each metric, and use
statistical techniques to interrelate external quality features and internal product
attributes.
Zipf's Law
The law can be applied to fields other than literature. Zipfian distributions
have been found in the population ranks of cities in various countries,
corporation sizes, income rankings and ranks of the number of people
watching the same TV channel.
It is believed that during this process the range of answers will decrease
and the group will converge towards the "correct" answer. Finally, the
process is stopped after a predefined stop criterion (e.g. number of
rounds, achievement of consensus, and stability of results) and the mean
or median scores of the final rounds determine the results.
Kickoff Meeting
Estimation Meeting
Step 2 − The moderator conducts the kickoff meeting, in which the team
is presented with the problem specification and a high level task list, any
assumptions or project constraints. The team discusses on the problem
and estimation issues, if any. They also decide on the units of estimation.
The moderator guides the entire discussion, monitors time and after the
kickoff meeting, prepares a structured document containing problem
specification, high level task list, assumptions, and the units of
estimation that are decided. He then forwards copies of this document
for the next step.
Step 5 − The entire Estimation team assembles for the estimation
meeting.
The individual detailed task lists contribute to a more complete task list
when combined.
Step 5.4 − The team then discusses any doubt/problem they have about
the tasks they have arrived at, assumptions made, and estimation
issues.
Step 5.5 − Each team member then revisits his/her task list and
assumptions, and makes changes if necessary. The task estimates also
may require adjustments based on the discussion, which are noted as +N
Hrs. for more effort and –N Hrs. for less effort.
The team members then combine the changes in the task estimates to
arrive at the total project estimate.
Step 5.6 − The moderator collects the changed estimates from all the
team members and plots them on the Round 2 line.
In this round, the range will be narrower compared to the earlier one, as
it is more consensus based.
Step 5.7 − The team then discusses the task modifications they have
made and the assumptions.
Step 5.8 − Each team member then revisits his/her task list and
assumptions, and makes changes if necessary. The task estimates may
also require adjustments based on the discussion.
The team members then once again combine the changes in the task
estimate to arrive at the total project estimate.
Step 5.9 − The moderator collects the changed estimates from all the
members again and plots them on the Round 3 line.
Again, in this round, the range will be narrower compared to the earlier
one.
Step 5.10 − Steps 5.7, 5.8, 5.9 are repeated till one of the following
criteria is met −
Step 6.1 − He compiles the individual task lists and the corresponding
estimates into a single master task list.
Step 6.3 − He then reviews the final task list with the Estimation team.
Disadvantages
Any change in the software configuration Items will affect the final product.
Therefore, changes to configuration items need to be controlled and
managed.
Baselines
Change Control
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:
Example:
Baseline:
A baseline is a formally accepted version of a software configuration item. It
is designated and fixed at a specific time while conducting the SCM
process. It can only be changed through formal change control procedures.
Change Control:
Change control is a procedural method which ensures quality and
consistency when changes are made in the configuration object. In this
step, the change request is submitted to software configuration manager.
Activities during this process:
1. Configuration Manager
2. Developer
3. Auditor
4. Project Manager:
5. User
The end user should understand the key SCM terms to ensure he has the
latest version of the software
The SCMP can follow a public standard like the IEEE 828 or
organization specific standard
It defines the types of documents to be management and a document
naming. Example Test_v1
SCMP defines the person who will be responsible for the entire SCM
process and creation of baselines.
Fix policies for version management & change control
Define tools which can be used during the SCM process
Configuration management database for recording configuration
information.
Concurrency Management:
When two or more tasks are happening at the same time, it is known as
concurrent operation. Concurrency in context to SCM means that the same
file being edited by multiple persons at the same time.
If concurrency is not managed correctly with SCM tools, then it may create
many pressing issues.
Version Control:
SCM uses archiving method or saves every change made to file. With the
help of archiving or save feature, it is possible to roll back to the previous
version in case of issues.
Synchronization:
Users can checkout more than one files or an entire copy of the repository.
The user then works on the needed file and checks in the changes back to
the repository.They can synchronize their local copy to stay updated with
the changes made by other team members.
1. Git: Git is a free and open source tool which helps version control. It is
designed to handle all types of projects with speed and efficiency.
Conclusion:
Configuration Management helps organizations to systematically
manage, organize, and control the changes in the documents, codes,
and other entities during the Software Development Life Cycle.
The primary goal of the SCM process is to increase productivity with
minimal mistakes
The main reason behind configuration management process is that
there are multiple people working on software which is continually
updating. SCM helps establish concurrency, synchronization, and
version control.
A baseline is a formally accepted version of a software configuration
item
Change control is a procedural method which ensures quality and
consistency when changes are made in the configuration object.
Configuration status accounting tracks each release during the SCM
process
Software Configuration audits verify that all the software product
satisfies the baseline needs
Project manager, Configuration manager, Developer, Auditor, and
user are participants in SCM process
The SCM process planning begins at the early phases of a project.
Git, Team foundation Sever and Ansible are few popular SCM tools