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

Lecture 07 and 08

Uploaded by

ora.fox
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)
13 views

Lecture 07 and 08

Uploaded by

ora.fox
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/ 48

Cairo University

Institute of Studies and Statistics Research


Department of Computer & Information Sciences

Dr.Atef Raslan

1
2
What is Testing?
 Testing is the process of evaluating a system or its
component(s) with the intent to find whether it
satisfies the specified requirements or not.
 In simple words, testing is executing a system in
order to identify any gaps, errors, or missing
requirements in contrary to the actual requirements.
 According to ANSI/IEEE 1059 standard, Testing can
be defined as - A process of analyzing a software item
to detect the differences between existing and
required conditions (that is defects/errors/bugs) and
to evaluate the features of the software item.
3
Who does Testing?
 It depends on the process and the associated
stakeholders of the project(s).
 In the IT industry, large companies have a team with
responsibilities to evaluate the developed software in
context of the given requirements.
 Moreover, developers also conduct testing which is
called Unit Testing.

4
 In most cases, the following professionals are
involved in testing a system within their respective
capacities − Software Tester , Software
Developer , Project Manager , End User
 Different companies have different designations for
people who test the software on the basis of their
experience and knowledge such as
 Software Tester, Software Quality Assurance
Engineer, QA Analyst, etc.

5
When to Start Testing?
 An early start to testing reduces the cost and time to
rework and produce error-free software that is
delivered to the client.
 However in Software Development Life Cycle
(SDLC), testing can be started from the
Requirements Gathering phase and continued till the
deployment of the software.

6
 It also depends on the development model that is
being used.
 in the Waterfall model, formal testing is conducted in
the testing phase; but in the incremental model,
testing is performed at the end of every
increment/iteration and the whole application is
tested at the end.

7
Testing is done in different forms at
every phase of SDLC
 During the requirement gathering phase, the
analysis and verification of requirements are also
considered as testing.
 Reviewing the design in the design phase with the
intent to improve the design is also considered as
testing.
 Testing performed by a developer on completion
of the code is also categorized as testing.

8
When to Stop Testing?
 It is difficult to determine when to stop testing, as
testing is a never-ending process and no one can
claim that a software is 100% tested.
 The following aspects are to be considered for
stopping the testing process −
 Testing Deadlines
 Completion of test case execution
 Completion of functional and code coverage to a certain point
 Bug rate falls below a certain level and no high-priority bugs are
identified
 Management decision

9
Verification & Validation
 These two terms are very confusing for most people,
who use them interchangeably.
 The following table highlights the differences
between verification and validation.

10
No. Verification Validation
1 Verification addresses the concern: "Are you Validation addresses the concern:
building it right?" "Are you building the right
thing?"
2 Ensures that the software system meets all the Ensures that the functionalities
functionality. meet the intended behavior.

3 Verification takes place first and includes the Validation occurs after
checking for documentation, code, etc. verification and mainly involves
the checking of the overall
product.
4 Done by developers. Done by testers.
5 It has static activities, as it includes collecting It has dynamic activities, as it
reviews, walkthroughs, and inspections to verify a includes executing the software
software. against the requirements.

6 It is an objective process and no subjective It is a subjective process and


decision should be needed to verify a software. involves subjective decisions on
how well a software works.

11
Validation Methods :
 Range check
 Suitable for date& numeric data type
 Checks whether data is within given values.
 Example :
 A student’s score should be in the range >0 but <100.
 Normal Data : data with accepted range (Accepted Data)
 Abnormal Data: data with out of range (Rejected Data)
 Extreme Data: This data lies on boundaries (Accepted
Data)

12
Validation Methods :
 Length check
 Suitable for text& date data type
 Checks if the input data contain the required number
of characters.
 Example :
 Telephone should be 11 digits
0 1 2 2 4 3 1 5 2 1 0

13
Validation Methods :
 Type check
 Checks that the input data does not contain invalid
characters.
 Data type:
 Integer : 7 ,5,4,..
 String : “Test”
 Char : ‘A’
 Boolean : Yes or No – True or False
 Example :
 Username should not contain any numbers.
ADMIN_USER √
ADMIN_USER2020 X 14
Validation Methods :
 Format check
 Suitable for date& text data type
 Checks that data is in a specific format.
 Example :
 Student’s id should be started with 3 Letters and followed
by 4 digits
SEM2021 √
2021SEM X
 DoB format : dd/mm/yyyy
12/10/2021 √
12/31/21 X
15
Validation Methods :
 Limit check
 Suitable for a numeric data type
 Similar to range check except that only one of the
boundaries is checked.
 Example :
 Student’s score must be >0
 DoB should be on or after 31/10/1990

16
Validation Methods :
 Presence check
 Suitable for a primary keys
 Checks if data is actually present and has not been
missed out.
 Example :
 Student’s id should be present

17
Validation Methods :
 Lookup check
 Suitable for a list of values
 A table lookup check takes the entered data item and
compares it to a list of valid entries that are stored in a
database table.
 If the entry is in the list of valid entries then it is
allowed. Otherwise it is rejected.
 Example :
 Country field
 Color field

18
Validation Methods :
 Check digit
 Suitable for a Barcode only
 Looks at an extra digit which is calculated from the
digits of a number and then put on the end of the
number
 Example :
 ISBN
 Barcode

19
Check digit
 Check digit
1. Add all the odd positioned digits together, excluding
the check digit.
2. Add all the even positioned digits together and
multiply the result by 3.
3. Add the results from 1 and 2 together and divide by
10.
4. Take the remainder, if it is zero use this value,
otherwise subtract the remainder
5. from 10 to find the check digit.
20
Check digit

Using the ISBN above 9 7 8 0 3 4 0 9 8 3 8 2 without its check digit:


1. 9 + 8 + 3 + 0 + 8 + 8 = 36
2. 3(7 + 0 + 4 + 9 + 3 + 2) = 75
3. (36 + 75)/10 = 11 remainder 1
4. 10 – 1 = 9 the check digit.
21
Check digit
To check that an ISBN 13 digit code is correct a similar process is
followed.
1 Add all the odd positioned digits together, including the check digit.
2 Add all the even positioned digits together and multiply the result by 3.
3 Add the results from 1 and 2 together and divide by 10.
4 The number is correct if the remainder is zero.

1. 9 + 8 + 3 + 0 + 8 + 8 + 9 = 45
2. 3(7 + 0 + 4 + 9 + 3 + 2) = 75
3. (45 + 75)/10 = 12 remainder 0
4. Remainder is 0 therefore number is correct.
22
Verification Methods
 Verification is checking that data has been accurately
copied onto the computer or
 transferred from one part of a computer system to
another.
 Verification methods include:
 double entry
 Screen/visual check

23
Verification Methods
 Double Entry
 For DOUBLE ENTRY the data is entered twice,
sometimes by different operators;
 The computer system compares both entries and
outputs an error message requesting that the data is
entered again if they are different.

24
Verification Methods
 SCREEN/VISUAL CHECK
 It is a manual check completed by the user who is
entering the data.
 When the data entry is complete the data is displayed
on the screen and the user is asked to confirm that it is
correct before continuing.
 The user either checks the data on the screen against a
paper document that is being used as an input form or
confirms from their own knowledge if the data is about
them.

25
Case Study
 Celia has employed Adam, a systems analyst, to
create a new database system for her car sales
business.
 She only sells cars made by Rock and only the
models Feisty, Mendo and Galactica in red, blue or
gold.
 Most of the cars have air conditioning but some do
not. She sells 3, 4 and 5 door cars.

26
Case Study
 She only sells cars made
by Rock and only the
models Feisty, Mendo
and Galactica in red, blue
or gold.
 Most of the cars have air
conditioning but some do
not. She sells 3, 4 and 5
door cars.

27
Case Study
 Design a test plan for the student table which
include the following fields :
 StudentId
 StudentName
 DoB
 Email
 Score
 Country

28
Case Study
 Design a test plan for the student table which
include the following fields :
 StudentId : Lenth Check /Formt check
 StudentName:Type Check
 DoB:Formt Check
 Email:Formt Check
 Score :Range Check
 Country:Lookup Check

29
Case Study: Score Test Plan
Field Name Student.Score

Validation
Range Check
Type
Data Type Integer
Data Expected Actual
Type Of Test Pass/Fail
Entered Output Output
40 Normal Accept Accepted Pass
0 Accept Accepted Pass
Extreme
100 Accept Accepted Pass
-80 Abnormal Reject Rejected Pass

30
Case Study: DoB
Field Name Student.DoB

Validation
Formt Check (dd/mm/yyyy)
Type
Data Type Date
Data Expected Actual
Type Of Test Pass/Fail
Entered Output Output
01/04/2020 Normal Accept Accepted Pass
1.Dec.2020 Abnormal Reject Rejected Pass
12/31/19 Abnormal Reject Rejected Pass

31
Software Testing Tools
 The following tools can be used for automation
testing −
 HP Quick Test Professional
 Selenium
 IBM Rational Functional Tester
 SilkTest
 TestComplete
 Testing Anywhere
 WinRunner
 LoadRunner
 Visual Studio Test Professional
 WATIR 32
Software Testing Methods

33
Black-Box Testing
 The technique of testing without having any
knowledge of the interior workings of the application
is called black-box testing.
 The tester is oblivious to the system architecture and
does not have access to the source code.
 Typically, while performing a black-box test, a tester
will interact with the system's user interface by
providing inputs and examining outputs without
knowing how and where the inputs are worked upon.

34
White-Box Testing
 White-box testing is the detailed investigation of
internal logic and structure of the code.
 White-box testing is also called glass
testing or open-box testing.
 In order to perform white-box testing on an
application, a tester needs to know the internal
workings of the code.

35
Grey-Box Testing
 Grey-box testing is a technique to test the application
with having a limited knowledge of the internal
workings of an application.
 Mastering the domain of a system always gives the
tester an edge over someone with limited domain
knowledge.
 in grey-box testing, the tester has access to design
documents and the database.
 Having this knowledge, a tester can prepare better
test data and test scenarios while making a test plan.
36
Testing Levels
 There are different levels during the process of
testing. In this chapter, a brief description is
provided about these levels.
 Levels of testing include different methodologies that
can be used while conducting software testing. The
main levels of software testing are −
 Functional Testing
 Non-functional Testing

37
Functional Testing
 This is a type of black-box testing that is based on the
specifications of the software that is to be tested.
 The application is tested by providing input and then
the results are examined that need to conform to the
functionality it was intended for.
 Functional testing of a software is conducted on a
complete, integrated system to evaluate the system's
compliance with its specified requirements.

38
Functional Testing Steps
1. The determination of the functionality that the
intended application is meant to perform.
2. The creation of test data based on the specifications
of the application.
3. The output based on the test data and the
specifications of the application.
4. The writing of test scenarios and the execution of
test cases.
5. The comparison of actual and expected results
based on the executed test cases.
39
Unit Testing
 This type of testing is performed by developers
before the setup is handed over to the testing team to
formally execute the test cases.
 Unit testing is performed by the respective
developers on the individual units of source code
assigned areas.
 The developers use test data that is different from
the test data of the quality assurance team.
 The goal of unit testing is to isolate each part of the
program and show that individual parts are correct
in terms of requirements and functionality.
40
Integration Testing
 Integration testing is defined as the testing of
combined parts of an application to determine if they
function correctly. Integration testing can be done in
two ways:
 Bottom-up integration testing
 This testing begins with unit testing, followed by tests of
progressively higher-level combinations of units called
modules or builds.
 Top-down integration testing.
 In this testing, the highest-level modules are tested first and
progressively, lower-level modules are tested thereafter.

41
System Testing
 System testing tests the system as a whole.
 Once all the components are integrated, the
application as a whole is tested rigorously to see that
it meets the specified Quality Standards.
 This type of testing is performed by a specialized
testing team

42
Regression Testing
 Regression testing is performed to verify that a fixed
bug hasn't resulted in another functionality or
business rule violation.
 The intent of regression testing is to ensure that a
change, such as a bug fix should not result in another
fault being uncovered in the application.

43
Alpha Testing
 This test is the first stage of testing and will be
performed amongst the teams (developer and QA
teams).
 Unit testing, integration testing and system testing
when combined together is known as alpha testing.
 During this phase, the following aspects will be
tested in the application −
 Spelling Mistakes, Broken Links and Cloudy Directions
 The Application will be tested on machines with the lowest
specification to test loading times and any latency
problems.
44
Beta Testing
 This test is performed after alpha testing has been
successfully performed.
 In beta testing, a sample of the intended audience
tests the application.
 Beta testing is also known as pre-release testing.
 Beta test versions of software are ideally distributed
to a wide audience on the Web.

45
Non-Functional Testing
 Non-functional testing involves testing a software
from the requirements which are non-functional in
nature but important such as performance, security,
user interface, etc.
 Performance Testing
 Load Testing
 Stress Testing
 Usability Testing
 Security Testing
 Portability Testing

46
47
48

You might also like