SlideShare a Scribd company logo
1 of 14
WHAT IS TESTING ?
Presentation of Jeri Handika
http://sif.uin-suska.ac.id/
http://fst.uin-suska.ac.id/
http://www.uin-suska.ac.id/
Referensi Graham et.al (2006)
Program Studi S1
Sistem Informasi
Fakultas Sains dan Teknologi
Universitas Islam Negeri Sultan Syarif Kasim Riau
WHAT IS TESTING?
I. The driving test - an analogy for software testing
The format of the driving test and the conduct of the
examiner are worth considering:
• The test is planned and prepared for. In advance of the test, the examiner
has planned a series of routes which cover the key driving activities to
allow a thorough assessment of the driver's performance. The drivers
under test do not know what route they will be asked to take in advance,
although they know the requirements of the test.
Referensi Graham et.al (2006)
• The test has known goals - assessing whether the driver is sufficiently safe to
be allowed to drive by themselves without an instructor, without endanger
ing themselves or others. There are clear pass/fail criteria, based on the
number and severity of faults, but the confidence of the examiner in the
driving is also taken into account.
• The test is therefore carried out to show that the driver satisfies the require
ments for driving and to demonstrate that they are fit to drive. The examiner
looks for faults in the driving. The time for the test is limited, so it is not a
complete test of the driver's abilities, but it is representative and allows the
examiner to make a risk-based decision about the driver. All the drivers are
tested in an equivalent way and the examiner is neutral and objective. The
examiner will log factual observations which enable a risk assessment to be
made about the driving. Based on this, a driver who passes will be given a
form enabling him to apply for a full driving license. A driver who fails will get
a report with a list of faults and areas to improve before retaking the test.
• As well as observing the driver actually driving, the examiner will ask
questions or the driver will take a written exam to check their under standing
of the rules of the road, road signs, and what to do in various traffic
situations.
Referensi Graham et.al (2006)
II. Defining software testing
With that analogy in mind, let's look at the ISTQB definition of software
testing.
Let's break the definition down into parts; the definition has some key
phrases to remember. The definition starts with a description of testing as a
process and then lists some objectives of the test process.
First, let's look at testing as a process:
• Process - Testing is a process rather than a single activity - there are a
series of activities involved.
• All life cycle activities - Chapter 2 looks at testing as a process that takes
place throughout the software development life cycle. We saw earlier
that the later in the life cycle we find bugs, the more expensive they are
to fix. If we can find and fix requirements defects at the requirements
stage, that must make commercial sense. We'll build the right software,
correctly and at a lower cost overall. So, the thought process of design
ing tests early in the life cycle can help to prevent defects from being
introduced into code. We sometimes refer to this as 'verifying the test
basis via the test design'. The test basis includes documents such as the
requirements and design specifications.
Referensi Graham et.al (2006)
• Both static and dynamic - We'll see in Chapter 3 that as well as tests where the
software code is executed to demonstrate the results of running tests (often
called dynamic testing) we can also test and find defects without exe cuting code.
This is called static testing. This testing includes reviewing of documents
(including source code) and static analysis. This is a useful and cost effective way
of testing.
• Planning - Activities take place before and after test execution. We need to
manage the testing; for example, we plan what we want to do; we control the
test activities; we report on testing progress and the status of the software under
test; and we finalize or close testing when a phase completes. Chapter
• 5 covers these test management activities.
• Preparation - We need to choose what testing we'll do, by selecting test con
ditions and designing test cases. Chapter 4 covers the test design activities.
• Evaluation - As well as executing the tests, we must check the results and
evaluate the software under test and the completion criteria, which help us
decide whether we have finished testing and whether the software product has
passed the tests.
• Software products and related work products - We don't just test code. We test
the requirements and design specifications, and we test related documents such
as operation, user and training material. Static and dynamic testing are both
needed to cover the range of products we need to test.
Referensi Graham et.al (2006)
The second part of the definition covers the some of the objectives for testing - the
reasons why we do it:
• Determine that (software products) satisfy specified requirements - Some of the
testing we do is focused on checking products against the specification for the
product; for example we review the design to see if it meets require ments, and then
we might execute the code to check that it meets the design. If the product meets its
specification, we can provide that information to help stakeholders judge the quality
of the product and decide whether it is ready for use.
• Demonstrate that (software products) are fit for purpose - This is slightly different to
the point above; after all the specified requirements might be wrong or incomplete.
'Fit for purpose' looks at whether the software does enough to help the users to carry
out their tasks; we look at whether the soft ware does what the user might
reasonably expect. For example, we might look at who might purchase or use the
software, and check that it does do what they expect; this might lead us to add a
review of the marketing mate rial to our static tests, to check that expectations of the
software are properly set. One way of judging the quality of a product is by how fit it
is for its purpose.
• Detect defects - We most often think of software testing as a means of detecting
faults or defects that in operational use will cause failures. Finding the defects helps us
understand the risks associated with putting the software into operational use, and
fixing the defects improves the quality of the prod ucts. However, identifying defects
has another benefit. With root cause analysis, they also help us improve the
development processes and make fewer mistakes in future work.
Referensi Graham et.al (2006)
III. Software test and driving test compared
The driver being examined becomes the system or software under test, and
you'll see as we go through this book that the same approach broadly holds.
• Planning and preparation - Both the examiner and the tester need a plan
of action and need to prepare for the test, which is not exhaustive, but is
repre sentative and allows risk-based decisions about the outcome.
• Static and dynamic - Both dynamic (driving the car or executing the soft
ware) and static (questions to the driver or a review of the software)
tests are useful.
• Evaluation - The examiner and the tester must make an objective
evaluation, log the test outcome and report factual observations about
the test.
• Determine that they satisfy specified requirements - The examiner and
tester both check against requirements to carry out particular tasks
successfully.
• Demonstrate that they are fit for purpose - The examiner and the tester
are not evaluating for perfection but for meeting sufficient of the
attributes required to pass the test.
• Detect defects - The examiner and tester both look for and log faults.
Referensi Graham et.al (2006)
IV. When can we meet our test objectives?
We mentioned above that testing can have different
goals and objectives, which often include:
• finding defects;
• gaining confidence in and providing information
about the level of quality;
• preventing defects.
Referensi Graham et.al (2006)
V. Focusing on defects can help us plan our tests
Reviewing defects and failures in order to improve processes allows
us to improve our testing and our requirements, design and
development processes. One phenomenon that many testers have observed
is that defects tend to cluster. This can happen because an area of the code
is particularly complex and tricky, or because changing software and other
products tends to cause knock-on defects. Testers will often use this
information when making their risk assessment for planning the tests, and
will focus on known'hot spots'.
A main focus of reviews and other static tests is to carry out testing
as early as possible, finding and fixing defects more cheaply and preventing
defects from appearing at later stages of this project. These activities help us
find out about defects earlier and identify potential clusters. Additionally, an
important outcome of all testing is information that assists in risk assess-
ment; these reviews will contribute to the planning for the tests executed
later in the software development life cycle. We might also carry out root
cause analysis to prevent defects and failures happening again and perhaps
to identify the cause of clusters and potential future clusters.
Referensi Graham et.al (2006)
VI. The defect clusters change over time
Over time, as we improve our whole software development life cycle and
the early static testing, we may well find that dynamic test levels find fewer
defects. A typical test improvement initiative will initially find more defects
as the testing improves and then, as the defect prevention kicks in, we see
the defect numbers dropping, as shown in Figure 1.3. The first part of the
improvement enables us to reduce failures in operation; later the improve-
ments are making us more efficient and effective in producing the software
with fewer defects in it.
As the 'hot spots' for bugs get cleaned up we need to move our focus else-
where, to the next set of risks. Over time, our focus may change from finding
coding bugs, to looking at the requirements and design documents for
defects, and to looking for process improvements so that we prevent defects
in the product. Referring to Figure 1.3, by releases 9 and 10, we would
expect that the overall cost and effort associated with reviews and testing is
much lower than in releases 4 or 7.
Referensi Graham et.al (2006)
VII. Debugging removes defects
When a test finds a defect that must be fixed, a programmer must do some work to
locate the defect in the code and make the fix. In this process, called debug- ging, a
programmer will examine the code for the immediate cause of the problem, repair
the code and check that the code now executes as expected. The fix is often then
tested separately (e.g. by an independent tester) to confirm the fix. Notice that
testing and debugging are different activities. Developers may test their own fixes, in
which case the very tight cycle of identifying faults,
debugging, and retesting is often loosely
referred to as debugging. However, often
following the debugging cycle the fixed
code is tested independently both to
retest the fix itself and to apply regression
testing to the surrounding unchanged
software.
Referensi Graham et.al (2006)
VIII. Is the software defect free?
This principle arises from the theory of the process of scientific
experimenta- tion and has been adopted by testers; you'll see the
idea in many testing books. While you are not expected to read the
scientific theory [Popper] the analogy used in science is useful;
however many white swans we see, we cannot say 'All swans are
white'. However, as soon as we see one black swan we can say 'Not
all swans are white'. In the same way, however many tests we
execute without finding a bug, we have not shown 'There are no
bugs'. As soon as we find a bug, we have shown 'This code is not bug-
free'.
Referensi Graham et.al (2006)
IX. If we don't find defects does that mean the users will
accept the software?
There is another important principle we must consider; the
customers for soft- ware - the people and organizations who buy and
use it to aid in their day-to- day tasks - are not interested in defects or
numbers of defects, except when they are directly affected by the
instability of the software. The people using soft- ware are more
interested in the software supporting them in completing tasks
efficiently and effectively. The software must meet their needs. It is
for this reason that the requirements and design defects we
discussed earlier are so important, and why reviews and inspections
(see Chapter 3) are such a funda- mental part of the entire test
activity.
What is TESTING

More Related Content

What's hot (19)

stlc
stlcstlc
stlc
 
Software testing introduction
Software testing  introductionSoftware testing  introduction
Software testing introduction
 
Unit 5 st ppt
Unit 5 st pptUnit 5 st ppt
Unit 5 st ppt
 
Approaches to Software Testing
Approaches to Software TestingApproaches to Software Testing
Approaches to Software Testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Fundamentals of software testing
Fundamentals of software testingFundamentals of software testing
Fundamentals of software testing
 
Software testing-life-cycle-process Process
Software testing-life-cycle-process ProcessSoftware testing-life-cycle-process Process
Software testing-life-cycle-process Process
 
Basics of Automation & Manual Software Testing
Basics of Automation & Manual Software TestingBasics of Automation & Manual Software Testing
Basics of Automation & Manual Software Testing
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycle
 
Ch14
Ch14Ch14
Ch14
 
stlc
stlcstlc
stlc
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Unit4 for st.pdf
Unit4 for st.pdfUnit4 for st.pdf
Unit4 for st.pdf
 
St
StSt
St
 
Testing strategies
Testing strategiesTesting strategies
Testing strategies
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Software test life cycle
Software test life cycleSoftware test life cycle
Software test life cycle
 

Similar to What is TESTING

01. foundamentals of testing
01. foundamentals of testing01. foundamentals of testing
01. foundamentals of testingTricia Karina
 
Fundamental Of Testing
Fundamental Of TestingFundamental Of Testing
Fundamental Of Testingsuci maisaroh
 
Fundamental test process 1
Fundamental test process 1Fundamental test process 1
Fundamental test process 1Bima Alvamiko
 
Fundamental test process
Fundamental test process Fundamental test process
Fundamental test process alex swandi
 
1651003086422.pptx
1651003086422.pptx1651003086422.pptx
1651003086422.pptxSravya221181
 
Fundamental test process (andika m)
Fundamental test process (andika m)Fundamental test process (andika m)
Fundamental test process (andika m)Andika Mardanu
 
Materi testing dan Implementasi sistem - Fundamentals of testing-What is Testing
Materi testing dan Implementasi sistem - Fundamentals of testing-What is TestingMateri testing dan Implementasi sistem - Fundamentals of testing-What is Testing
Materi testing dan Implementasi sistem - Fundamentals of testing-What is Testingdevinta sari
 
Fundamental of testing
Fundamental of testingFundamental of testing
Fundamental of testingReginaKhalida
 
Fundamental test process
Fundamental test processFundamental test process
Fundamental test processDinul
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance Webtech Learning
 
Why is testing necessary
Why is testing necessaryWhy is testing necessary
Why is testing necessarychayo rona
 
Fundamental test process
Fundamental test processFundamental test process
Fundamental test processYoga Setiawan
 
Fundamental Test Process
Fundamental Test ProcessFundamental Test Process
Fundamental Test ProcessRakhesLeoPutra
 

Similar to What is TESTING (20)

What is the testing ?
What is  the testing ?What is  the testing ?
What is the testing ?
 
What is testing?
What is testing?What is testing?
What is testing?
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
 
01. foundamentals of testing
01. foundamentals of testing01. foundamentals of testing
01. foundamentals of testing
 
Fundamental test process
Fundamental test processFundamental test process
Fundamental test process
 
Defining software testing
Defining software testingDefining software testing
Defining software testing
 
Fundamental Of Testing
Fundamental Of TestingFundamental Of Testing
Fundamental Of Testing
 
Fundamental test process 1
Fundamental test process 1Fundamental test process 1
Fundamental test process 1
 
Fundamental test process
Fundamental test process Fundamental test process
Fundamental test process
 
1651003086422.pptx
1651003086422.pptx1651003086422.pptx
1651003086422.pptx
 
Fundamental test process (andika m)
Fundamental test process (andika m)Fundamental test process (andika m)
Fundamental test process (andika m)
 
Materi testing dan Implementasi sistem - Fundamentals of testing-What is Testing
Materi testing dan Implementasi sistem - Fundamentals of testing-What is TestingMateri testing dan Implementasi sistem - Fundamentals of testing-What is Testing
Materi testing dan Implementasi sistem - Fundamentals of testing-What is Testing
 
Fundamental of testing
Fundamental of testingFundamental of testing
Fundamental of testing
 
Fundamentals of Testing Section 1/6
Fundamentals of Testing   Section 1/6Fundamentals of Testing   Section 1/6
Fundamentals of Testing Section 1/6
 
Fundamental test process
Fundamental test processFundamental test process
Fundamental test process
 
Fundamental test process
Fundamental test processFundamental test process
Fundamental test process
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance
 
Why is testing necessary
Why is testing necessaryWhy is testing necessary
Why is testing necessary
 
Fundamental test process
Fundamental test processFundamental test process
Fundamental test process
 
Fundamental Test Process
Fundamental Test ProcessFundamental Test Process
Fundamental Test Process
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

What is TESTING

  • 1. WHAT IS TESTING ? Presentation of Jeri Handika http://sif.uin-suska.ac.id/ http://fst.uin-suska.ac.id/ http://www.uin-suska.ac.id/ Referensi Graham et.al (2006) Program Studi S1 Sistem Informasi Fakultas Sains dan Teknologi Universitas Islam Negeri Sultan Syarif Kasim Riau
  • 2. WHAT IS TESTING? I. The driving test - an analogy for software testing The format of the driving test and the conduct of the examiner are worth considering: • The test is planned and prepared for. In advance of the test, the examiner has planned a series of routes which cover the key driving activities to allow a thorough assessment of the driver's performance. The drivers under test do not know what route they will be asked to take in advance, although they know the requirements of the test. Referensi Graham et.al (2006)
  • 3. • The test has known goals - assessing whether the driver is sufficiently safe to be allowed to drive by themselves without an instructor, without endanger ing themselves or others. There are clear pass/fail criteria, based on the number and severity of faults, but the confidence of the examiner in the driving is also taken into account. • The test is therefore carried out to show that the driver satisfies the require ments for driving and to demonstrate that they are fit to drive. The examiner looks for faults in the driving. The time for the test is limited, so it is not a complete test of the driver's abilities, but it is representative and allows the examiner to make a risk-based decision about the driver. All the drivers are tested in an equivalent way and the examiner is neutral and objective. The examiner will log factual observations which enable a risk assessment to be made about the driving. Based on this, a driver who passes will be given a form enabling him to apply for a full driving license. A driver who fails will get a report with a list of faults and areas to improve before retaking the test. • As well as observing the driver actually driving, the examiner will ask questions or the driver will take a written exam to check their under standing of the rules of the road, road signs, and what to do in various traffic situations. Referensi Graham et.al (2006)
  • 4. II. Defining software testing With that analogy in mind, let's look at the ISTQB definition of software testing. Let's break the definition down into parts; the definition has some key phrases to remember. The definition starts with a description of testing as a process and then lists some objectives of the test process. First, let's look at testing as a process: • Process - Testing is a process rather than a single activity - there are a series of activities involved. • All life cycle activities - Chapter 2 looks at testing as a process that takes place throughout the software development life cycle. We saw earlier that the later in the life cycle we find bugs, the more expensive they are to fix. If we can find and fix requirements defects at the requirements stage, that must make commercial sense. We'll build the right software, correctly and at a lower cost overall. So, the thought process of design ing tests early in the life cycle can help to prevent defects from being introduced into code. We sometimes refer to this as 'verifying the test basis via the test design'. The test basis includes documents such as the requirements and design specifications. Referensi Graham et.al (2006)
  • 5. • Both static and dynamic - We'll see in Chapter 3 that as well as tests where the software code is executed to demonstrate the results of running tests (often called dynamic testing) we can also test and find defects without exe cuting code. This is called static testing. This testing includes reviewing of documents (including source code) and static analysis. This is a useful and cost effective way of testing. • Planning - Activities take place before and after test execution. We need to manage the testing; for example, we plan what we want to do; we control the test activities; we report on testing progress and the status of the software under test; and we finalize or close testing when a phase completes. Chapter • 5 covers these test management activities. • Preparation - We need to choose what testing we'll do, by selecting test con ditions and designing test cases. Chapter 4 covers the test design activities. • Evaluation - As well as executing the tests, we must check the results and evaluate the software under test and the completion criteria, which help us decide whether we have finished testing and whether the software product has passed the tests. • Software products and related work products - We don't just test code. We test the requirements and design specifications, and we test related documents such as operation, user and training material. Static and dynamic testing are both needed to cover the range of products we need to test. Referensi Graham et.al (2006)
  • 6. The second part of the definition covers the some of the objectives for testing - the reasons why we do it: • Determine that (software products) satisfy specified requirements - Some of the testing we do is focused on checking products against the specification for the product; for example we review the design to see if it meets require ments, and then we might execute the code to check that it meets the design. If the product meets its specification, we can provide that information to help stakeholders judge the quality of the product and decide whether it is ready for use. • Demonstrate that (software products) are fit for purpose - This is slightly different to the point above; after all the specified requirements might be wrong or incomplete. 'Fit for purpose' looks at whether the software does enough to help the users to carry out their tasks; we look at whether the soft ware does what the user might reasonably expect. For example, we might look at who might purchase or use the software, and check that it does do what they expect; this might lead us to add a review of the marketing mate rial to our static tests, to check that expectations of the software are properly set. One way of judging the quality of a product is by how fit it is for its purpose. • Detect defects - We most often think of software testing as a means of detecting faults or defects that in operational use will cause failures. Finding the defects helps us understand the risks associated with putting the software into operational use, and fixing the defects improves the quality of the prod ucts. However, identifying defects has another benefit. With root cause analysis, they also help us improve the development processes and make fewer mistakes in future work. Referensi Graham et.al (2006)
  • 7. III. Software test and driving test compared The driver being examined becomes the system or software under test, and you'll see as we go through this book that the same approach broadly holds. • Planning and preparation - Both the examiner and the tester need a plan of action and need to prepare for the test, which is not exhaustive, but is repre sentative and allows risk-based decisions about the outcome. • Static and dynamic - Both dynamic (driving the car or executing the soft ware) and static (questions to the driver or a review of the software) tests are useful. • Evaluation - The examiner and the tester must make an objective evaluation, log the test outcome and report factual observations about the test. • Determine that they satisfy specified requirements - The examiner and tester both check against requirements to carry out particular tasks successfully. • Demonstrate that they are fit for purpose - The examiner and the tester are not evaluating for perfection but for meeting sufficient of the attributes required to pass the test. • Detect defects - The examiner and tester both look for and log faults. Referensi Graham et.al (2006)
  • 8. IV. When can we meet our test objectives? We mentioned above that testing can have different goals and objectives, which often include: • finding defects; • gaining confidence in and providing information about the level of quality; • preventing defects. Referensi Graham et.al (2006)
  • 9. V. Focusing on defects can help us plan our tests Reviewing defects and failures in order to improve processes allows us to improve our testing and our requirements, design and development processes. One phenomenon that many testers have observed is that defects tend to cluster. This can happen because an area of the code is particularly complex and tricky, or because changing software and other products tends to cause knock-on defects. Testers will often use this information when making their risk assessment for planning the tests, and will focus on known'hot spots'. A main focus of reviews and other static tests is to carry out testing as early as possible, finding and fixing defects more cheaply and preventing defects from appearing at later stages of this project. These activities help us find out about defects earlier and identify potential clusters. Additionally, an important outcome of all testing is information that assists in risk assess- ment; these reviews will contribute to the planning for the tests executed later in the software development life cycle. We might also carry out root cause analysis to prevent defects and failures happening again and perhaps to identify the cause of clusters and potential future clusters. Referensi Graham et.al (2006)
  • 10. VI. The defect clusters change over time Over time, as we improve our whole software development life cycle and the early static testing, we may well find that dynamic test levels find fewer defects. A typical test improvement initiative will initially find more defects as the testing improves and then, as the defect prevention kicks in, we see the defect numbers dropping, as shown in Figure 1.3. The first part of the improvement enables us to reduce failures in operation; later the improve- ments are making us more efficient and effective in producing the software with fewer defects in it. As the 'hot spots' for bugs get cleaned up we need to move our focus else- where, to the next set of risks. Over time, our focus may change from finding coding bugs, to looking at the requirements and design documents for defects, and to looking for process improvements so that we prevent defects in the product. Referring to Figure 1.3, by releases 9 and 10, we would expect that the overall cost and effort associated with reviews and testing is much lower than in releases 4 or 7. Referensi Graham et.al (2006)
  • 11. VII. Debugging removes defects When a test finds a defect that must be fixed, a programmer must do some work to locate the defect in the code and make the fix. In this process, called debug- ging, a programmer will examine the code for the immediate cause of the problem, repair the code and check that the code now executes as expected. The fix is often then tested separately (e.g. by an independent tester) to confirm the fix. Notice that testing and debugging are different activities. Developers may test their own fixes, in which case the very tight cycle of identifying faults, debugging, and retesting is often loosely referred to as debugging. However, often following the debugging cycle the fixed code is tested independently both to retest the fix itself and to apply regression testing to the surrounding unchanged software. Referensi Graham et.al (2006)
  • 12. VIII. Is the software defect free? This principle arises from the theory of the process of scientific experimenta- tion and has been adopted by testers; you'll see the idea in many testing books. While you are not expected to read the scientific theory [Popper] the analogy used in science is useful; however many white swans we see, we cannot say 'All swans are white'. However, as soon as we see one black swan we can say 'Not all swans are white'. In the same way, however many tests we execute without finding a bug, we have not shown 'There are no bugs'. As soon as we find a bug, we have shown 'This code is not bug- free'. Referensi Graham et.al (2006)
  • 13. IX. If we don't find defects does that mean the users will accept the software? There is another important principle we must consider; the customers for soft- ware - the people and organizations who buy and use it to aid in their day-to- day tasks - are not interested in defects or numbers of defects, except when they are directly affected by the instability of the software. The people using soft- ware are more interested in the software supporting them in completing tasks efficiently and effectively. The software must meet their needs. It is for this reason that the requirements and design defects we discussed earlier are so important, and why reviews and inspections (see Chapter 3) are such a funda- mental part of the entire test activity.