0% found this document useful (0 votes)
6 views

Lecture 3 Introduction to Software Engineering

The document outlines the importance of software specification, requirements, and testing in the software development lifecycle. It details the iterative process of creating a specification, the types of software requirements, and the critical role of software testing in ensuring quality and functionality. Additionally, it discusses various testing methodologies, types of errors, and the challenges faced in software testing.

Uploaded by

tchoutor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lecture 3 Introduction to Software Engineering

The document outlines the importance of software specification, requirements, and testing in the software development lifecycle. It details the iterative process of creating a specification, the types of software requirements, and the critical role of software testing in ensuring quality and functionality. Additionally, it discusses various testing methodologies, types of errors, and the challenges faced in software testing.

Uploaded by

tchoutor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Lecture Three (3)

Software Specification, Requirements and Testing


Outline
 Software Specification
 Software Requirements
 Software Tests
 Software Quality

1. Software specification
The specification of a software system is one of the most important abstract
documents that connect the customer and the engineering team.
The customer uses the specification to really capture what they want the system to
do upfront, what behavior they want to have and what properties the system
should exhibit.
The engineering team interpret this document from the customer to come up with
their designs and implementation to support the features that are requested by the
customer.
In summary it is an abstraction of what the system will be at the end.

1.1. Process of creating a specification


The process of finalizing a specification is an iterative one as customers and
development team work together to finalize what the product will be at the end
 Requirements Elicitation Phase: Involves everyone gathering the
requirements for the system and figuring what will actually be build
 Analysis Phase: in the analysis phase we are going to look at the
requirements we have gathered and check for consistency and see if they
make sense and don’t conflict with each other. We also look at some concerns
that the development team might have in implementing particular
requirements
 Reification Phase: we are actually writing down the requirements in a more
formal way that would be use throughout the entire SDLC process. (i.e.
formalize output of Elicitation and Analysis Phase)
 Validation Phase: Go back to customer with final list of requirements and
make sure they match their expectation.

Elicitation Analysis Reification Validation

Fig 1: Process of creating specification

2. Software Requirements:
Capturing requirements is an important part of the specification process. It involves
gaining knowledge on what is needed from the system.

2.1. Types of Software Requirements


Requirements generally fall into 2 high level categories Functional and Non-
Functional requirements
a. Functional Requirements:
They capture what it is that the system should do. Examples of functional
requirements are:
 Users should be able to login into the platform
 Users should be able to send messages on the platform
 Users should be able to download videos on the platform

b. Non-Functional Requirements: They capture the properties that the system


should have or exhibit such as:
 Performance: how fast can the system carry out its task
 Usability: How user friendly is
 Scalability: Ability of our system to accommodate more users.
 Reliability: Ability for a system to be trustworthy and perform consistently
well
 Security: The system should store and manage user’s data securely.
2.2. Properties of Requirements
These are the properties we should keep in mind when trying to express or capture
our requirements. For a requirement to be good it must be:
a) Complete: Make sure we capture all the requirements that our system will
need.
b) Consistent: Requirements should be in accordance(consistent) with each
other
c) Precise: Try as much as possible to use precise language when expressing
requirements.
d) Concise: it involves giving a lot of information clearly and in few words.
conciseness helps to check if our requirements are complete and consistent.

3. Software Testing
Software Testing is the most important part of the Software Development Life
Cycle (SDLC). One cannot release the final product without passing it through the
testing process. In this phase, the program under test is executed to reveal faults,
and after detecting failures, debugging techniques are applied to isolate and
remove faults.

3.1. What is software testing?

- Software Testing is executing a program with the intent of finding errors.


It also ensures that the system is working according to the design specification.

- Software Testing is an empirical (experimental) investigation conducted to provide


stakeholders with information about the quality of the product or service under test.
The two important goals of software testing are to ensure system being developed
is according to the customer requirements and to reveal bugs. An essential form of
software assurance is software testing. Testing is laborious, expensive and time-
consuming job, so the choice of testing must be based on the risk to the system
- Software testing is a vital part of software development and automation makes it
faster, more reliable and cost efficient

3.2. Why do we Need Software Testing?


The importance of testing cannot be overemphasized.
 There are lots of different devices, browsers, and operating systems out
there. Testing on multiple devices, browsers, operating systems can
help ensure your website works for as many of your users as possible.
(User Diversity and Portability).
 Software prevails in our living environment. (Health Care, Business,
Transportation, Education, Telecommunications, Finance, Military,
Entertainment, Weather, etc.) their Quality significantly influences our
quality of life.
 Software faults in critical software systems (A safety-critical system is
defined as a system in which the malfunctioning of software could result
in death, injury or damage to environment) may cause dramatic damages
on our lives. E.g. in 1986 two cancer patients at the East Texas cancer
Center received fatal radiation overdoses from the computer-controlled
radiation therapy machine.
3.3. Goals of software testing
 Reveal faults (finding errors: Syntax Errors, Logical errors, Semantic
errors, etc.)
 Establish confidence in the software
 Clarification of user’s requirement specification

3.4. Terms used in software testing


 Test case: It is simply an input data to a software we are testing.
 Test suite or Test Set: It is a set of Test cases or simply a collection of
test cases
 Test coverage: It is the measure of the degree to which the source code
of a program has been tested.
 Test Plans: These are documents that spell out how you will test in
order to prove the system and what activities will be followed to get
the job done.
3.5. Software testing Methodologies
Software testing methodologies are the different approaches of ensuring that
a software application is fully tested. These encompass everything from front-
end to back-end testing.
3.6. Types Software testing Methodologies
Basically, there are two main types of software testing methodologies. They
include: Black box and White box testing.
3.6.1. White-Box Testing or Structural Testing (Dynamic Testing):
Testing by executing the program with real inputs. White box testing focuses on the
internal structure of the system under test. Paths through the software are identified
and tested. This requires knowledge of the programming language being used.
Some synonyms of white box testing are:
1) Glass box testing
2) Clear box testing
3) Open box testing
4) Transparent box testing
5) Structural testing
6) Logic driven testing
7) Design based testing

3.6.1.1. Levels of White Box Testing


White-box testing methods are usually conducted in order and include:
 Unit Testing: This is the first level of testing and is often performed by the developers
themselves. It is the process of ensuring individual components of the software work as they
were designed to.
 Integration Testing: The Integration testing deals with testing different
modules/components that have been successfully unit tested. This type of testing is done
during the integration of the software modules.
 System Testing: System testing is the process of testing a completely integrated system to
verify that it meets its requirement specifications.
 Acceptance Testing: The acceptance testing part of a testing methodology that ensures
that the requirement specifications of the software product have been met and that the end-
users and customers have tested the system to make sure it operates as expected and
meets all their defined requirements. Conducted on Developer’s environment and Customer’s
environment
 Regression Testing: Regression testing is the process of re-testing software that has been
modified.

3.6.2. Black-Box Testing or Functional Testing (Static Testing):


Static Testing: Testing without executing the program. This includes software
inspections and some forms of analysis.
Functional testing equally known as black testing is a quality assurance process that
bases its test cases on the specifications of the software component under test.
Functional testing ensures that the requirements are properly satisfied by the
application. functional testing involves testing the application
against the business requirements.

3.6.2.1. Types of Black Box Testing


 Performance testing:
Performance testing is a type of testing performed to determine how a system
performs in terms of responsiveness and stability under a particular workload
 Load Testing:
Load testing is the testing process which is usually conducted to
study the behavior of the system under specific expected load (normal load). Load testing
is meant to test the system by constantly and steadily increasing the load on the system
till the time it reaches the threshold limit.
 Stress Testing:
Stress testing is the testing process which is usually conducted
to study the behavior of the system under extreme load.
 Usability Testing
The usability testing part of a testing methodology looks at the end-user usability
aspect of the software. The ease with which a user can access the product, forms the
main testing point. Usability testing looks at four (4) aspects of testing, - learnability,
efficiency, satisfaction, and memorability.
 Security testing
It tests the software for confidentiality, integrity, authentication, availability, and non-
repudiation. Individual tests are conducted to prevent any unauthorized access to the
software code
 Compatibility testing
Testing to ensure compatibility of an application or Web site with different browsers,
OSs, and hardware platforms

Other types of testing include:


(a) Alpha Testing: Testing by the customer at the developer’s site.
(b) Beta Testing: Testing by the customer at the customer’s site.
(c) Conformance testing: Verifying implementation conformance to industry standards.
3.7. Differences between White-box testing and Black-Box Testing
White-Box Testing Black-Box Testing
Black box testing refers to testing
evaluates the code and internal structure of
a software item without knowing
the program.
anything about its inner workings.
It requires knowledge of the It does not require knowledge of the
programming language being used programming language being used.
In White Box Testing, we test the In Black Box Testing, we test the
software from a developers’ view point. software from a user’s view point.
Test cases are generated from requirement
Test cases are generated from Source code
specification

3.8. Types of Software Errors


An Error is an unexpected behavior in a software, common types of errors include:
 Syntax Errors -- A syntax error is a program statement that violates one or
more rules of the language in which it is written it is usually caught by the
compiler, and reported as a compiler error messages. E.g. Missing braces
 Semantic or Logic Error – Logic error occurs when a program produces
incorrect results. i.e. A program that compiles and runs to normal completion,
may not do what you want.
 Run-Time Errors -- a program that compiles may die while running with a
runtime error message that may or may not be useful. Run-time errors result
from incorrect assumptions, incomplete understanding of the programming
language, or unanticipated user errors. E.g. errors like division-by-zero

3.9. Challenges of Software Testing


 Testing adds a huge cost to product development
 Incomplete, informal and changing specifications or incomplete users’
requirements.
 Lack of Software testing tools
 Testing effectiveness and software quality is hard to measure

3.10. Testing and debugging


Testing: It involves the identification of bug/error/defect in the software without
correcting it. Normally professionals with a Quality Assurance background are involved
in the identification of bugs. Testing is performed in the testing phase.

You might also like