Professional Documents
Culture Documents
Software Quality 2019
Software Quality 2019
1
Desirable features of piece of software
• Maintainability;
• Reliability;
• Robustness;
• Usability
2
Maintainability
• Since the requirements of an applications often change over time.
3
Why is maintainability desirable?
• Today, you have the skills and knowledge to understand and make changes to your
software, but what about next week, or six months from now?
• What if a developer leaves your team (or they fall ill), and you need to take over
their code? What if you need to get a new developer up to speed with your
software? What if you have to suspend your project whilst you get more funding,
and then need to recall all the information about the software a year later?
• In all these cases, you or your developers, will find yourselves wading through
code trying to figure out how it all fits together. This isn't fun, and it wastes
valuable time that could be better spent actually improving your
software! Maintainable software is software that is easy to understand. It is code
that can be understood by someone new - or someone that hasn't seen it in a
while - with a minimum of effort. As software guru Martin Fowler said
in Refactoring: Improving the Design of Existing Code, 1999, "Good programmers
write code that humans can understand."
4
How to develop maintainable
software
• Developing maintainable software is like picnicking. Once you're finished, leave
your spot as you would like to find it yourself, or leave it in a better state than you
found it! There are a number of principles, approaches and techniques that can
help you develop maintainable software. Many of these are generally applicable to
writing good software:
– Design for maintainability from the outset
– Iterative development and regular reviews help to improve quality - see the
section below
– Readable code is easy to understand ("write programs for people")
– Refactor code to improve its understandability
– Relevant documentation helps developers understand the software
– Automated build make the code easy to compile
– Automated tests make it easy to validate changes
– Continuous integration makes the code easier to build and test
– Version control helps keep code, tests and documentation up to date and
synchronised
– Change the way you work to make maintainability a key goal
• Documentation
– A complete software system consists of more than just the
final program.
– It should also have additional support materials such as
• user manual
• Software design
• Clear method definitions (parameter return types, pseudocode
when appropriate)
• When including in code documentation consider the
following
– Comments to make the meaning of your code clear;
– Meaningful data names;
– Constants in place of fixed literal numbers;
– Consistent and clear indentation.
• Indent, by one level, all code that belongs within these braces
6
Reliability
• A Software Reliability is the probability of failure-
free software operation for a specified period of time in a
specified environment
• There are two kinds of errors which might occur when you
are building a program.
– Compile-time errors
– Run-time errors.
7
Compile-time errors:
• These are errors where by you can not
compile the program
• Missing end if
• Forgetting to close a do statement
• Being inconsistent with names and /or types;
• etc improper use of the syntax
Run Time Error:
• A runtime error is a program error that occurs
while the program is running e.g:
– logic error, which produces the wrong output,
– wrong use of arithmetic operator etc.
8
Testing
• If you have no compilation errors (syntax errors)
then you should think of running your program to
ensure that it does what it is supposed to do this
is termed as testing.
9
Types of Testing
• Unit testing is a level of software testing where
individual units/ components of a software are tested.
The purpose is to validate that each unit of the
software performs as designed. A unit is the smallest
testable part of any software. It usually has one or a
few inputs and usually a single output
10
• Black Box Testing: also known as Behavioral
Testing, is a software testing method in
which the internal
structure/design/implementation of the
item being tested is not known to the
tester.
– A group of inputs that all produce the
same output are regarded as equivalent
– 70<=x<=100
– 60<=x<70 etc
• White Box Testing is defined as the testing
of a software solution's internal structure,
design, and coding. In this type of testing,
the code is visible to the tester. It focuses
primarily on verifying the flow of inputs
and outputs through the application,
improving design and usability,
strengthening security is a method
of testing software that tests internal
structures or workings of an application
11
The test log
• Come up with a TEST LOG. This is a document
that records the testing that took place during
system development.
12
Robustness
• Robustness is the ability of a computer system to
cope with errors during execution and cope with
erroneous input
14