0% found this document useful (0 votes)
74 views21 pages

Software Engineering: Coding & Testing Guide

The document discusses chapters from a textbook on fundamental software engineering concepts. It covers coding principles and guidelines, the coding process, and different coding standards. It then summarizes chapters on software testing, including the goals of testing, different testing types like unit and integration testing, and black box and white box testing approaches. Further chapters discussed software maintenance activities and challenges, as well as development tools and environments.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views21 pages

Software Engineering: Coding & Testing Guide

The document discusses chapters from a textbook on fundamental software engineering concepts. It covers coding principles and guidelines, the coding process, and different coding standards. It then summarizes chapters on software testing, including the goals of testing, different testing types like unit and integration testing, and black box and white box testing approaches. Further chapters discussed software maintenance activities and challenges, as well as development tools and environments.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Fundamental of Software Engineering

CHAPTER Six: Coding


Faculty of Technology
Department of Computer Science
Debre Tabor University
March, 2021
Objectives
Understand Coding
Identify Principles and Guidelines
Understand Process of Coding
6.1 Coding
Good software development organizations normally require
their programmers to adhere to some well-defined and standard
style of coding called coding standards.
The purpose of requiring all engineers of an organization to
adhere to a standard style of coding is the following:
•A coding standard gives a uniform appearance to the
codes written by different engineers.
• It enhances code understanding.
• It encourages good programming practices.
• A coding standard lists several rules to be followed during
coding, such as the way variables are to be named, the way the
code is to be laid out, error return conventions, etc.
6.2 Programming principles and guidelines

 Good software development organizations usually develop their


own coding standards and guidelines depending on what best
suits their organization and the type of products they develop.
 The following are some representative coding standards.
 Rules for limiting the use of global: These rules list what types of data
can be declared global and what cannot.
The following are some standard header data:
o Name of the module.
o Date on which the module was created.
o Author’s name.
o Modification history.
o Different functions supported, along with their input/output
parameters.
o Global variables accessed/modified by the module.
6.3 Coding Standards

Naming conventions for global variables, local


variables, and constant identifiers.
Error return conventions and exception handling
mechanisms.
Do not use a coding style that is too clever or too
difficult to understand.
Do not use an identifier for multiple purposes.
The code should be well-documented.
The length of any function should not exceed 10
source lines
Fundamental of Software Engineering

CHAPTER SEVEN: SOFTWARE


TESTING
Faculty of Technology
Department of Computer Science
Debre Tabor University

March,
2021
Objectives
Define SW Testing
Understand Principles of SW Testing
Identify types of Testing
7.1 Testing Fundamentals
Testing is a program consists of providing the program with
a set of test inputs (or test cases) and observing if the
program behaves as expected.
7.1.1 Aim of testing
The aim of the testing process is to identify all defects existing
in a software product.
7.1.2 System Testing
 System shall be unit tested, integrated, and retested in a systematic
manner. Hardware is assembled and tested.
 System Testing is the process of executing a program or system with
the intent of finding errors. Or, it involves any activity aimed at
evaluating an attribute or capability of a program or system and
determining that it meets its required results.
System testing can be divided into: Correctness testing,
Performance testing, Reliability testing and Security testing.
Correctness is the minimum requirement of software, the
essential purpose of testing. Correctness testing will need some
type of vision, to tell the right behavior from the wrong one.
Cont..
Performance testing
 Performance evaluation of a software system usually includes:
resource usage, throughput, stimulus-response time and queue
lengths detailing the average or maximum number of tasks waiting
to be serviced by selected resources.
 Reliability testing
 System reliability refers to the probability of failure-free operation
of a system. It is related to many aspects of system, including the
testing process.
Security testing
 System quality, reliability and security are tightly coupled. Flaws in
system can be exploited by intruders to open security holes.
 Many critical system applications and services have integrated
security measures against malicious attacks.
Cont..
Unit testing
Each module or unit or component is tested alone in an
attempt to discover any errors that may exist in the code.
Integration Tests
The process of bringing together all of the modules that a
program comprises for testing purposes. Modules are
typically integrated in a top-down, incremental fashion.
Subsystem/System Testing
The bringing together of all the programs that a system
comprises for testing purposes.
All results should be documented on the Test Analysis
Report, Test Problem Report and on the Test Analysis
Approval Determination.
Cont..
Acceptance Testing
 The process whereby actual users test a completed

information system. The end result of which is the users


acceptance of it.

Testing automation
 System testing can be very costly. Automation is a good

way to cut down time and cost.


7.2 Black box testing
In the black-box testing, test cases are designed from an
examination of the input/output values only and no
knowledge of design or code is required. The following
are the two main approaches to designing black box test
cases.
• Equivalence class portioning
• Boundary value analysis
7.2.1 Equivalence Class Partitioning
The domain of input values to a program is partitioned into
a set of equivalence classes. This partitioning is done such
that the behavior of the program is similar for every input
data belonging to the same equivalence class.
7.2 Black box testing
Example#1: For a software that computes the square root
of an input integer which can assume values in the range of
0 to 5000, there are three equivalence classes: The set of
negative integers, the set of integers in the range of 0 and
5000, and the integers larger than 5000. Therefore, the test
cases must include representatives for each of the three
equivalence classes and a possible test set can be: {-
5,500,6000}.
7.2.2 Boundary Value Analysis
 A type of programming error frequently occurs at the

boundaries of different equivalence classes of inputs. For


example, programmers may improperly use < instead of
<=, or conversely <= for <.
 Example: For a function that computes the square root of

integer values in the range of 0 and 5000, the test cases


must include the following values: {0, -1, 5000, 5001}.

Generally, Black box test does not deal with internal


structure of the component.
7.3 White box testing
 Focuses on the internal structure of the components.
Testing and Debugging
 Debugging assumes that faults can be found by starting
from un planned failure.
 But testing, is a fault detection that tries to create failure
or errors in a planned way.
Validation and Verification
 Verification refers to a set of activities that ensure that
software implements a specific function.
 But validation, refers to a different set of activities that
ensure that the software that has been built traceable to
customer requirements.
Chapter 8: Maintenance
 Systems and products are in place and operating,
enhancements and modifications.
 Modifying of software or hardware.
 40-90 % total life cycle cost
 Reusing existing activity
Activities
Obtaining maintenance request
Transforming requests in to changes
Designing changes
Implementing changes
Types of Maintenance
 Corrective maintenance
Changes made on information system to repair defects.
After installation.
 Adaptive maintenance
Changes on IS to evolve on functionality or migrate to
different operation environment. Change in software and
Hardware platform.
 Perfective maintenance
Making enhancements to improve performance, interface
usability. User and efficiency enhancements.
Top 5 problems
 Poor quality of documentation
 User demand for enhancements
 Difficulty in meeting scheduled commitments
 Turnover in user organizations
Chapter 9: Tools and environment
 Tools
Is a program or application that software developers used
to create, debug and maintain. Like Delphi, C++ builder,
Microsoft visual studio and eclipse.
Software Environment
The environment for developing and maintain software
systems.
Front end tools
Back end tools
Import and export interfaces
Change control
Database administration
Documentation control
Thank You!

You might also like