SlideShare a Scribd company logo
CHAPTER THREE
Static Techniques
ZETRYAN SATRIA
Program Studi S1 Sistem Informasi
Universitas Islam Negeri Sultan Syarif Kasim Riau
 Static test techniques provide a powerful way to improve the quality and
productivity of software development. This chapter describes static test techniques,
including reviews, and provides an overview of how they are conducted. The
fundamental objective of static testing is to improve the quality of software work
products by assisting engineers to recognize and fix their own defects early in the
software development process. While static testing techniques will not solve all the
problems, they are enormously effective. Static techniques can improve both
quality and productivity by impressive factors. Static testing is not magic and it
should not be considered a replacement for dynamic testing, but all software
organizations should consider using reviews in all major aspects of their work
including requirements, design, implementation, testing, and maintenance. Static
analysis tools implement automated checks, e.g. on code.
REVIEWS AND THE TEST PROCESS
 With dynamic testing methods, software is executed using a set of input values and its output is
then examined and compared to what is expected. During static testing, software work products
are examined manually, or with a set of tools, but not executed. As a consequence, dynamic testing
can only be applied to software code. Dynamic execution is applied as a technique to detect
defects and to determine quality attributes of the code. This testing option is not applicable for the
majority of the software work products. Among the questions that arise are: How can we evaluate
or analyze a requirements document, a design document, a test plan, or a user manual? How can
we effectively pre-examine the source code before execution? One powerful technique that can be
used is static testing, e.g. reviews. In principle all software work products can be tested using
review techniques.
 Dynamic testing and static testing are complementary methods, as they tend to find different types
of defects effectively and efficiently. Types of defects that are easier to find during static testing
are: deviations from standards, missing requirements, design defects, non-maintainable code and
inconsistent interface specifications. Note that in contrast to dynamic testing, static testing finds
defects rather than failures.
Phases of a formal review
In contrast to informal reviews, formal reviews follow a formal process. A typical formal
review process consists of six main steps:
1. Planning
2. Kick-off
3. Preparation
4. Review meeting
5. Rework
6. Follow-up.
The best formal reviews come from well-organized teams, guided by trained moderators
(or review leaders). Within a review team, four types of participants can be distinguished:
moderator, author, scribe and reviewer. In addition management needs to play a role in
the review process.
Types of review
 Walkthrough, A walkthrough is characterized by the author of the document under review guiding the
participants through the document and his or her thought processes, to achieve a common understanding
and to gather feedback. This is especially useful if people from outside the software discipline are present,
who are not used to, or cannot easily understand software development documents. The content of the
document is explained step by step by the author, to reach consensus on changes or to gather
information.
 Technical review, A technical review is a discussion meeting that focuses on achieving consensus about
the technical content of a document. Compared to inspections, technical reviews are less formal and there
is little or no focus on defect identification on the basis of referenced documents, intended readership and
rules. During technical reviews defects are found by experts, who focus on the content of the document.
The experts that are needed for a technical review are, for example, architects, chief designers and key
users. In practice, technical reviews vary from quite informal to very formal.
 Inspection, Inspection is the most formal review type. The document under inspection is prepared and
checked thoroughly by the reviewers before the meeting, comparing the work product with its sources
and other referenced documents, and using rules and checklists. In the inspection meeting the defects
found are logged and any discussion is postponed until the discussion phase. This makes the inspection
meeting a very efficient meeting.
Success factors for reviews
 Find a 'champion'A champion is needed, one who will lead the process on a project or organizational level. They need expertise,
enthusiasm and a practical mindset in order to guide moderators and participants. The authority of this champion should be clear to
the entire organization. Management support is also essential for success. They should, amongst other things, incorporate adequate
time for review activities in project schedules.
 Pick things that really count, Select the documents for review that are most important in a project. Reviewing highly critical, upstream
documents like requirements and architecture will most certainly show the benefits of the review process to the project. These invested
review hours will have a clear and high return on investment. In addition make sure each review has a clear objective and the correct
type of review is selected that matches the defined objective. Don't try and review everything by inspection; fit the review to the risk
associated with the document. Some documents may only warrant an informal review and others will repay using inspection. Of course
it is also of utmost importance that the right people are involved.
 Explicitly plan and track review activities, To ensure that reviews become part of the day-to-day activities, the hours to be spent
should be made visible within each project plan. The engineers involved are prompted to schedule time for preparation and, very
importantly, rework. Tracking these hours will improve planning of the next review. As stated earlier, management plays an important
part in planning of review activities.
 Train participants, It is important that training is provided in review techniques, especially the more formal techniques, such as
inspection. Otherwise the process is likely to be impeded by those who don't understand the process and the reasoning behind it.
Special training should be provided to the moderators to prepare them for their critical role in the review process.
 Manage people issues, Reviews are about evaluating someone's document. Some reviews tend to get too personal when they are not
well managed by the moderator. People issues and psychological aspects should be dealt with by the moderator and should be part of
the review training, thus making the review a positive experience for the author. During the review, defects should be welcomed and
expressed objectively.
Success factors for reviews
 Follow the rules but keep it simple, Follow all the formal rules until you know why and how to
modify them, but make the process only as formal as the project culture or maturity level allows. Do
not become too theoretical or too detailed. Checklists and roles are recommended to increase the
effectiveness of defect identification.
 Continuously improve process and tools, Continuous improvement of process and supporting
tools (e.g. checklists), based upon the ideas of participants, ensures the motivation of the engineers
involved. Motivation is the key to a successful change process. There should also be an emphasis, in
addition to defect finding, on learning and process improvement.
 Report results, Report quantified results and benefits to all those involved as soon as possible, and
discuss the consequences of defects if they had not been found this early. Costs should of course
be tracked, but benefits, especially when problems don't occur in the future, should be made visible
by quantifying the benefits as well as the costs.
 Just do it!, The process is simple but not easy. Each step of the process is clear, but experience is
needed to execute them correctly. So, try to get experienced people to observe and help where
possible. But most importantly, start doing reviews and start learning from every review.
STATIC ANALYSIS BY TOOLS
 There is much to be done examining software work products without actually running the system.
For example, we saw in the previous section that we can carefully review requirements, designs,
code, test plans and more, to find defects and fix them before we deliver a product to a customer.
In this section, we focus on a different kind of static testing, where we carefully examine
requirements, designs and code, usually with automated assistance to ferret out additional defects
before the code is actually run. Thus, what is called static analysis is just another form of testing.
 Static analysis is an examination of requirements, design and code that differs from more traditional
dynamic testing in a number of important ways:
1. Static analysis is performed on requirements, design or code without actually executing the software
artifact being examined.
2. Static analysis is ideally performed before the types of formal review discussed in Section 3.2.
3. Static analysis is unrelated to dynamic properties of the requirements, design and code, such as test
coverage.
4. The goal of static analysis is to find defects, whether or not they may cause failures. As with reviews,
static analysis finds defects rather than failures.
STATIC ANALYSIS BY TOOLS
 One of the reasons for using static analysis (coding standards and the like) is related to the
characteristics of the programming languages themselves. One may think that the languages are
safe to use, because at least the standards committee knows where the problems are. But this
would be wrong. Adding to the holes left by the standardization process, programmers continue to
report features of the language, which though well-defined, lead to recognizable fault modes. By
the end of the 1990s, approximately 700 of these additional problems had been identified in
standard C. It is now clear that such fault modes exist. It can be demonstrated that they frequently
escape the scrutiny of conventional dynamic testing, ending up in commercial products. These
problems can be found by using static analysis tools to detect them.
 In fact, many of the 700 fault modes reported in C can be detected in this way! In a typical C
program, there is an average of approximately eight such faults per 1000 lines of source code; they
are embedded in the released code, just waiting to cause the code to fail [Hatton, 1997]. Dynamic
testing simply did not detect them. C is not the culprit here; this exercise can be carried out for
other languages with broadly the same results. All programming languages have problems and
programmers cannot assume that they are protected against them. And nothing in the current
international process of standardizing languages will prevent this from happening in the future.
CODE STRUCTURE
There are many different kinds of structural measures, each of which tells us something about the effort required to write the code in the first
place, to understand the code when making a change, or to test the code using particular tools or techniques. It is often assumed that a large
module takes longer to specify, design, code and test than a smaller one. But in fact the code's structure plays a big part. There are several
aspects of code structure to consider:
 control flow structure;
 data flow structure;
 data structure.
 The important thing for the tester is to be aware that the above mentioned static analysis measures can be used as early warning
signals of how good the code is likely to be when it is finished.
 In summary the value of static analysis is especially for:
 early detection of defects prior to test execution;
 early warning about suspicious aspects of the code, design or requirements;
 identification of defects not easily found in dynamic testing;
 improved maintainability of code and design since engineers work according to documented standards and rules;
 prevention of defects, provided that engineers are willing to learn from their errors and continuous improvement is practised.
BACKLINK
https://sif.uin-suska.ac.id/
https://fst.uin-suska.ac.id/
https://www.uin-suska.ac.id/
Referensi Graham et.al (2006)

More Related Content

What's hot

Introduction to Software Review
Introduction to Software ReviewIntroduction to Software Review
Introduction to Software Review
Philip Johnson
 
Static Testing
Static TestingStatic Testing
Static Testing
Hoang Nguyen
 
Unit3 software review control software
Unit3 software review control softwareUnit3 software review control software
Unit3 software review control software
Reetesh Gupta
 
static techniques
static techniquesstatic techniques
static techniques
aidil fitra
 
softwareinspections
softwareinspectionssoftwareinspections
softwareinspections
Dorin Paunescu
 
Software Inspection And Defect Management
Software Inspection And Defect ManagementSoftware Inspection And Defect Management
Software Inspection And Defect Management
Ajay K
 
Static Testing
Static Testing Static Testing
Static Testing
Suraj Vishwakarma
 
Software Testing
Software Testing Software Testing
Software Testing
sajedah abukhdeir
 
Reviews and the test process
Reviews and the test processReviews and the test process
Reviews and the test process
nur fitrianti
 
Chapter 2 - Performance Measurement Fundamentals
Chapter 2 - Performance Measurement FundamentalsChapter 2 - Performance Measurement Fundamentals
Chapter 2 - Performance Measurement Fundamentals
Neeraj Kumar Singh
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
Rajeev Sharan
 
Astqb Slayb
Astqb SlaybAstqb Slayb
Astqb Slayb
nitin lakhanpal
 
Static Testing
Static TestingStatic Testing
Static Testing
Dharita Chokshi
 
Quality management checklist
Quality management checklistQuality management checklist
Quality management checklist
selinasimpson321
 
Software testing
Software testingSoftware testing
Software testing
sajedah abukhdeir
 
Learn software testing
Learn software testingLearn software testing
Learn software testing
sajedah abukhdeir
 
Ch14
Ch14Ch14
Static techniques
Static techniquesStatic techniques
Static techniques
Siti Rubayati
 
Fundamentals of Software Testing
Fundamentals of Software TestingFundamentals of Software Testing
Fundamentals of Software Testing
Sagar Joshi
 
Test management checklist
Test management checklistTest management checklist
Test management checklist
Harsha Kumar
 

What's hot (20)

Introduction to Software Review
Introduction to Software ReviewIntroduction to Software Review
Introduction to Software Review
 
Static Testing
Static TestingStatic Testing
Static Testing
 
Unit3 software review control software
Unit3 software review control softwareUnit3 software review control software
Unit3 software review control software
 
static techniques
static techniquesstatic techniques
static techniques
 
softwareinspections
softwareinspectionssoftwareinspections
softwareinspections
 
Software Inspection And Defect Management
Software Inspection And Defect ManagementSoftware Inspection And Defect Management
Software Inspection And Defect Management
 
Static Testing
Static Testing Static Testing
Static Testing
 
Software Testing
Software Testing Software Testing
Software Testing
 
Reviews and the test process
Reviews and the test processReviews and the test process
Reviews and the test process
 
Chapter 2 - Performance Measurement Fundamentals
Chapter 2 - Performance Measurement FundamentalsChapter 2 - Performance Measurement Fundamentals
Chapter 2 - Performance Measurement Fundamentals
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Astqb Slayb
Astqb SlaybAstqb Slayb
Astqb Slayb
 
Static Testing
Static TestingStatic Testing
Static Testing
 
Quality management checklist
Quality management checklistQuality management checklist
Quality management checklist
 
Software testing
Software testingSoftware testing
Software testing
 
Learn software testing
Learn software testingLearn software testing
Learn software testing
 
Ch14
Ch14Ch14
Ch14
 
Static techniques
Static techniquesStatic techniques
Static techniques
 
Fundamentals of Software Testing
Fundamentals of Software TestingFundamentals of Software Testing
Fundamentals of Software Testing
 
Test management checklist
Test management checklistTest management checklist
Test management checklist
 

Similar to Chapter 3 Static Techniques

Static techniques
Static techniquesStatic techniques
Static techniques
muhamad iqbal
 
Chapter Three Static Techniques
Chapter Three Static TechniquesChapter Three Static Techniques
Chapter Three Static Techniques
elvira munanda
 
03. static techniques
03. static techniques03. static techniques
03. static techniques
Tricia Karina
 
Marjuni.
Marjuni.Marjuni.
Marjuni.
marjuni .
 
Testing 1 static techniques
Testing 1 static techniquesTesting 1 static techniques
Testing 1 static techniques
Mini Marsiah
 
Static techniques
Static techniquesStatic techniques
Static techniques
Bayu Andika Pratama
 
Static techniques
Static techniquesStatic techniques
Static techniques
Amelia Septia Roza
 
Static Techniques
Static TechniquesStatic Techniques
Static Techniques
mentary fransiska
 
Testing & implementation system 3-wm
Testing & implementation system 3-wmTesting & implementation system 3-wm
Testing & implementation system 3-wm
Wiwik Muslehatin
 
Static nopri wahyudi
Static nopri wahyudiStatic nopri wahyudi
Static nopri wahyudi
Nopriwahyudi
 
Static techniques
Static techniquesStatic techniques
Static techniques
chayo rona
 
Static techniques
Static techniquesStatic techniques
Static techniques
adeafsa
 
Static techniques
Static techniquesStatic techniques
Static techniques
Arif Rakhmatullah.M
 
Chapter 3 - Reviews
Chapter 3 - ReviewsChapter 3 - Reviews
Chapter 3 - Reviews
Neeraj Kumar Singh
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance
Webtech Learning
 
Static techniques
Static techniquesStatic techniques
Static techniques
Miftahul Jannaty
 
Testing throughout the software life cycle & statistic techniques
Testing throughout the software life cycle & statistic techniquesTesting throughout the software life cycle & statistic techniques
Testing throughout the software life cycle & statistic techniques
Novika Damai Yanti
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
acemindia
 
Bab 3
Bab 3Bab 3

Similar to Chapter 3 Static Techniques (20)

Static techniques
Static techniquesStatic techniques
Static techniques
 
Chapter Three Static Techniques
Chapter Three Static TechniquesChapter Three Static Techniques
Chapter Three Static Techniques
 
03. static techniques
03. static techniques03. static techniques
03. static techniques
 
Marjuni.
Marjuni.Marjuni.
Marjuni.
 
Testing 1 static techniques
Testing 1 static techniquesTesting 1 static techniques
Testing 1 static techniques
 
Static techniques
Static techniquesStatic techniques
Static techniques
 
Static techniques
Static techniquesStatic techniques
Static techniques
 
Static Techniques
Static TechniquesStatic Techniques
Static Techniques
 
Testing & implementation system 3-wm
Testing & implementation system 3-wmTesting & implementation system 3-wm
Testing & implementation system 3-wm
 
Static nopri wahyudi
Static nopri wahyudiStatic nopri wahyudi
Static nopri wahyudi
 
Static techniques
Static techniquesStatic techniques
Static techniques
 
Static techniques
Static techniquesStatic techniques
Static techniques
 
Static techniques
Static techniquesStatic techniques
Static techniques
 
Chapter 3 - Reviews
Chapter 3 - ReviewsChapter 3 - Reviews
Chapter 3 - Reviews
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance
 
Static techniques
Static techniquesStatic techniques
Static techniques
 
Testing throughout the software life cycle & statistic techniques
Testing throughout the software life cycle & statistic techniquesTesting throughout the software life cycle & statistic techniques
Testing throughout the software life cycle & statistic techniques
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
 
Bab 3
Bab 3Bab 3
Bab 3
 

Recently uploaded

Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
OH TEIK BIN
 
Celebrating 25th Year SATURDAY, 27th JULY, 2024
Celebrating 25th Year SATURDAY, 27th JULY, 2024Celebrating 25th Year SATURDAY, 27th JULY, 2024
Celebrating 25th Year SATURDAY, 27th JULY, 2024
APEC Melmaruvathur
 
QCE – Unpacking the syllabus Implications for Senior School practices and ass...
QCE – Unpacking the syllabus Implications for Senior School practices and ass...QCE – Unpacking the syllabus Implications for Senior School practices and ass...
QCE – Unpacking the syllabus Implications for Senior School practices and ass...
mansk2
 
New Features in Odoo 17 Email Marketing - Odoo Slides
New Features in Odoo 17 Email Marketing - Odoo SlidesNew Features in Odoo 17 Email Marketing - Odoo Slides
New Features in Odoo 17 Email Marketing - Odoo Slides
Celine George
 
Lecture Notes Unit5 chapter 15 PL/SQL Programming
Lecture Notes Unit5 chapter 15 PL/SQL ProgrammingLecture Notes Unit5 chapter 15 PL/SQL Programming
Lecture Notes Unit5 chapter 15 PL/SQL Programming
Murugan146644
 
Pedagogy/Definition/Features/Approaches/Types
Pedagogy/Definition/Features/Approaches/TypesPedagogy/Definition/Features/Approaches/Types
Pedagogy/Definition/Features/Approaches/Types
SobiaAlvi
 
Brigada Eskwela editable Certificate.pptx
Brigada Eskwela editable Certificate.pptxBrigada Eskwela editable Certificate.pptx
Brigada Eskwela editable Certificate.pptx
aiofits06
 
Parkinson Disease & Anti-Parkinsonian Drugs.pptx
Parkinson Disease & Anti-Parkinsonian Drugs.pptxParkinson Disease & Anti-Parkinsonian Drugs.pptx
Parkinson Disease & Anti-Parkinsonian Drugs.pptx
AnujVishwakarma34
 
How to Fix Field Does Not Exist Error in Odoo 17
How to Fix Field Does Not Exist Error in Odoo 17How to Fix Field Does Not Exist Error in Odoo 17
How to Fix Field Does Not Exist Error in Odoo 17
Celine George
 
How to Make a Field Storable in Odoo 17 - Odoo Slides
How to Make a Field Storable in Odoo 17 - Odoo SlidesHow to Make a Field Storable in Odoo 17 - Odoo Slides
How to Make a Field Storable in Odoo 17 - Odoo Slides
Celine George
 
classroom orientation/ back to school...
classroom orientation/ back to school...classroom orientation/ back to school...
classroom orientation/ back to school...
RoselleRaguindin
 
Java MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHatJava MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHat
Scholarhat
 
Class 6 English Chapter 1 Fables and Folk Stories
Class 6 English Chapter 1 Fables and Folk StoriesClass 6 English Chapter 1 Fables and Folk Stories
Class 6 English Chapter 1 Fables and Folk Stories
sweetygupta8413
 
2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
FINAL MATATAG PE and Health CG 2023 Grades 4-10.pdf
FINAL MATATAG PE and Health CG 2023 Grades 4-10.pdfFINAL MATATAG PE and Health CG 2023 Grades 4-10.pdf
FINAL MATATAG PE and Health CG 2023 Grades 4-10.pdf
HayddieMaeCapunong
 
Email Marketing in Odoo 17 - Odoo 17 Slides
Email Marketing  in Odoo 17 - Odoo 17 SlidesEmail Marketing  in Odoo 17 - Odoo 17 Slides
Email Marketing in Odoo 17 - Odoo 17 Slides
Celine George
 
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdfPRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
nservice241
 
Java Developer Roadmap PDF By ScholarHat
Java Developer Roadmap PDF By ScholarHatJava Developer Roadmap PDF By ScholarHat
Java Developer Roadmap PDF By ScholarHat
Scholarhat
 
Java Full Stack Developer Interview Questions PDF By ScholarHat
Java Full Stack Developer Interview Questions PDF By ScholarHatJava Full Stack Developer Interview Questions PDF By ScholarHat
Java Full Stack Developer Interview Questions PDF By ScholarHat
Scholarhat
 
NLC 2024 - Certificate of Recognition
NLC  2024  -  Certificate of RecognitionNLC  2024  -  Certificate of Recognition
NLC 2024 - Certificate of Recognition
Deped
 

Recently uploaded (20)

Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
Life of Ah Gong and Ah Kim ~ A Story with Life Lessons (Hokkien, English & Ch...
 
Celebrating 25th Year SATURDAY, 27th JULY, 2024
Celebrating 25th Year SATURDAY, 27th JULY, 2024Celebrating 25th Year SATURDAY, 27th JULY, 2024
Celebrating 25th Year SATURDAY, 27th JULY, 2024
 
QCE – Unpacking the syllabus Implications for Senior School practices and ass...
QCE – Unpacking the syllabus Implications for Senior School practices and ass...QCE – Unpacking the syllabus Implications for Senior School practices and ass...
QCE – Unpacking the syllabus Implications for Senior School practices and ass...
 
New Features in Odoo 17 Email Marketing - Odoo Slides
New Features in Odoo 17 Email Marketing - Odoo SlidesNew Features in Odoo 17 Email Marketing - Odoo Slides
New Features in Odoo 17 Email Marketing - Odoo Slides
 
Lecture Notes Unit5 chapter 15 PL/SQL Programming
Lecture Notes Unit5 chapter 15 PL/SQL ProgrammingLecture Notes Unit5 chapter 15 PL/SQL Programming
Lecture Notes Unit5 chapter 15 PL/SQL Programming
 
Pedagogy/Definition/Features/Approaches/Types
Pedagogy/Definition/Features/Approaches/TypesPedagogy/Definition/Features/Approaches/Types
Pedagogy/Definition/Features/Approaches/Types
 
Brigada Eskwela editable Certificate.pptx
Brigada Eskwela editable Certificate.pptxBrigada Eskwela editable Certificate.pptx
Brigada Eskwela editable Certificate.pptx
 
Parkinson Disease & Anti-Parkinsonian Drugs.pptx
Parkinson Disease & Anti-Parkinsonian Drugs.pptxParkinson Disease & Anti-Parkinsonian Drugs.pptx
Parkinson Disease & Anti-Parkinsonian Drugs.pptx
 
How to Fix Field Does Not Exist Error in Odoo 17
How to Fix Field Does Not Exist Error in Odoo 17How to Fix Field Does Not Exist Error in Odoo 17
How to Fix Field Does Not Exist Error in Odoo 17
 
How to Make a Field Storable in Odoo 17 - Odoo Slides
How to Make a Field Storable in Odoo 17 - Odoo SlidesHow to Make a Field Storable in Odoo 17 - Odoo Slides
How to Make a Field Storable in Odoo 17 - Odoo Slides
 
classroom orientation/ back to school...
classroom orientation/ back to school...classroom orientation/ back to school...
classroom orientation/ back to school...
 
Java MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHatJava MCQ Questions and Answers PDF By ScholarHat
Java MCQ Questions and Answers PDF By ScholarHat
 
Class 6 English Chapter 1 Fables and Folk Stories
Class 6 English Chapter 1 Fables and Folk StoriesClass 6 English Chapter 1 Fables and Folk Stories
Class 6 English Chapter 1 Fables and Folk Stories
 
2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx2024 Winter SWAYAM NPTEL & A Student.pptx
2024 Winter SWAYAM NPTEL & A Student.pptx
 
FINAL MATATAG PE and Health CG 2023 Grades 4-10.pdf
FINAL MATATAG PE and Health CG 2023 Grades 4-10.pdfFINAL MATATAG PE and Health CG 2023 Grades 4-10.pdf
FINAL MATATAG PE and Health CG 2023 Grades 4-10.pdf
 
Email Marketing in Odoo 17 - Odoo 17 Slides
Email Marketing  in Odoo 17 - Odoo 17 SlidesEmail Marketing  in Odoo 17 - Odoo 17 Slides
Email Marketing in Odoo 17 - Odoo 17 Slides
 
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdfPRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
PRESS RELEASE - UNIVERSITY OF GHANA, JULY 16, 2024.pdf
 
Java Developer Roadmap PDF By ScholarHat
Java Developer Roadmap PDF By ScholarHatJava Developer Roadmap PDF By ScholarHat
Java Developer Roadmap PDF By ScholarHat
 
Java Full Stack Developer Interview Questions PDF By ScholarHat
Java Full Stack Developer Interview Questions PDF By ScholarHatJava Full Stack Developer Interview Questions PDF By ScholarHat
Java Full Stack Developer Interview Questions PDF By ScholarHat
 
NLC 2024 - Certificate of Recognition
NLC  2024  -  Certificate of RecognitionNLC  2024  -  Certificate of Recognition
NLC 2024 - Certificate of Recognition
 

Chapter 3 Static Techniques

  • 1. CHAPTER THREE Static Techniques ZETRYAN SATRIA Program Studi S1 Sistem Informasi Universitas Islam Negeri Sultan Syarif Kasim Riau
  • 2.  Static test techniques provide a powerful way to improve the quality and productivity of software development. This chapter describes static test techniques, including reviews, and provides an overview of how they are conducted. The fundamental objective of static testing is to improve the quality of software work products by assisting engineers to recognize and fix their own defects early in the software development process. While static testing techniques will not solve all the problems, they are enormously effective. Static techniques can improve both quality and productivity by impressive factors. Static testing is not magic and it should not be considered a replacement for dynamic testing, but all software organizations should consider using reviews in all major aspects of their work including requirements, design, implementation, testing, and maintenance. Static analysis tools implement automated checks, e.g. on code.
  • 3. REVIEWS AND THE TEST PROCESS  With dynamic testing methods, software is executed using a set of input values and its output is then examined and compared to what is expected. During static testing, software work products are examined manually, or with a set of tools, but not executed. As a consequence, dynamic testing can only be applied to software code. Dynamic execution is applied as a technique to detect defects and to determine quality attributes of the code. This testing option is not applicable for the majority of the software work products. Among the questions that arise are: How can we evaluate or analyze a requirements document, a design document, a test plan, or a user manual? How can we effectively pre-examine the source code before execution? One powerful technique that can be used is static testing, e.g. reviews. In principle all software work products can be tested using review techniques.  Dynamic testing and static testing are complementary methods, as they tend to find different types of defects effectively and efficiently. Types of defects that are easier to find during static testing are: deviations from standards, missing requirements, design defects, non-maintainable code and inconsistent interface specifications. Note that in contrast to dynamic testing, static testing finds defects rather than failures.
  • 4. Phases of a formal review In contrast to informal reviews, formal reviews follow a formal process. A typical formal review process consists of six main steps: 1. Planning 2. Kick-off 3. Preparation 4. Review meeting 5. Rework 6. Follow-up. The best formal reviews come from well-organized teams, guided by trained moderators (or review leaders). Within a review team, four types of participants can be distinguished: moderator, author, scribe and reviewer. In addition management needs to play a role in the review process.
  • 5. Types of review  Walkthrough, A walkthrough is characterized by the author of the document under review guiding the participants through the document and his or her thought processes, to achieve a common understanding and to gather feedback. This is especially useful if people from outside the software discipline are present, who are not used to, or cannot easily understand software development documents. The content of the document is explained step by step by the author, to reach consensus on changes or to gather information.  Technical review, A technical review is a discussion meeting that focuses on achieving consensus about the technical content of a document. Compared to inspections, technical reviews are less formal and there is little or no focus on defect identification on the basis of referenced documents, intended readership and rules. During technical reviews defects are found by experts, who focus on the content of the document. The experts that are needed for a technical review are, for example, architects, chief designers and key users. In practice, technical reviews vary from quite informal to very formal.  Inspection, Inspection is the most formal review type. The document under inspection is prepared and checked thoroughly by the reviewers before the meeting, comparing the work product with its sources and other referenced documents, and using rules and checklists. In the inspection meeting the defects found are logged and any discussion is postponed until the discussion phase. This makes the inspection meeting a very efficient meeting.
  • 6. Success factors for reviews  Find a 'champion'A champion is needed, one who will lead the process on a project or organizational level. They need expertise, enthusiasm and a practical mindset in order to guide moderators and participants. The authority of this champion should be clear to the entire organization. Management support is also essential for success. They should, amongst other things, incorporate adequate time for review activities in project schedules.  Pick things that really count, Select the documents for review that are most important in a project. Reviewing highly critical, upstream documents like requirements and architecture will most certainly show the benefits of the review process to the project. These invested review hours will have a clear and high return on investment. In addition make sure each review has a clear objective and the correct type of review is selected that matches the defined objective. Don't try and review everything by inspection; fit the review to the risk associated with the document. Some documents may only warrant an informal review and others will repay using inspection. Of course it is also of utmost importance that the right people are involved.  Explicitly plan and track review activities, To ensure that reviews become part of the day-to-day activities, the hours to be spent should be made visible within each project plan. The engineers involved are prompted to schedule time for preparation and, very importantly, rework. Tracking these hours will improve planning of the next review. As stated earlier, management plays an important part in planning of review activities.  Train participants, It is important that training is provided in review techniques, especially the more formal techniques, such as inspection. Otherwise the process is likely to be impeded by those who don't understand the process and the reasoning behind it. Special training should be provided to the moderators to prepare them for their critical role in the review process.  Manage people issues, Reviews are about evaluating someone's document. Some reviews tend to get too personal when they are not well managed by the moderator. People issues and psychological aspects should be dealt with by the moderator and should be part of the review training, thus making the review a positive experience for the author. During the review, defects should be welcomed and expressed objectively.
  • 7. Success factors for reviews  Follow the rules but keep it simple, Follow all the formal rules until you know why and how to modify them, but make the process only as formal as the project culture or maturity level allows. Do not become too theoretical or too detailed. Checklists and roles are recommended to increase the effectiveness of defect identification.  Continuously improve process and tools, Continuous improvement of process and supporting tools (e.g. checklists), based upon the ideas of participants, ensures the motivation of the engineers involved. Motivation is the key to a successful change process. There should also be an emphasis, in addition to defect finding, on learning and process improvement.  Report results, Report quantified results and benefits to all those involved as soon as possible, and discuss the consequences of defects if they had not been found this early. Costs should of course be tracked, but benefits, especially when problems don't occur in the future, should be made visible by quantifying the benefits as well as the costs.  Just do it!, The process is simple but not easy. Each step of the process is clear, but experience is needed to execute them correctly. So, try to get experienced people to observe and help where possible. But most importantly, start doing reviews and start learning from every review.
  • 8. STATIC ANALYSIS BY TOOLS  There is much to be done examining software work products without actually running the system. For example, we saw in the previous section that we can carefully review requirements, designs, code, test plans and more, to find defects and fix them before we deliver a product to a customer. In this section, we focus on a different kind of static testing, where we carefully examine requirements, designs and code, usually with automated assistance to ferret out additional defects before the code is actually run. Thus, what is called static analysis is just another form of testing.  Static analysis is an examination of requirements, design and code that differs from more traditional dynamic testing in a number of important ways: 1. Static analysis is performed on requirements, design or code without actually executing the software artifact being examined. 2. Static analysis is ideally performed before the types of formal review discussed in Section 3.2. 3. Static analysis is unrelated to dynamic properties of the requirements, design and code, such as test coverage. 4. The goal of static analysis is to find defects, whether or not they may cause failures. As with reviews, static analysis finds defects rather than failures.
  • 9. STATIC ANALYSIS BY TOOLS  One of the reasons for using static analysis (coding standards and the like) is related to the characteristics of the programming languages themselves. One may think that the languages are safe to use, because at least the standards committee knows where the problems are. But this would be wrong. Adding to the holes left by the standardization process, programmers continue to report features of the language, which though well-defined, lead to recognizable fault modes. By the end of the 1990s, approximately 700 of these additional problems had been identified in standard C. It is now clear that such fault modes exist. It can be demonstrated that they frequently escape the scrutiny of conventional dynamic testing, ending up in commercial products. These problems can be found by using static analysis tools to detect them.  In fact, many of the 700 fault modes reported in C can be detected in this way! In a typical C program, there is an average of approximately eight such faults per 1000 lines of source code; they are embedded in the released code, just waiting to cause the code to fail [Hatton, 1997]. Dynamic testing simply did not detect them. C is not the culprit here; this exercise can be carried out for other languages with broadly the same results. All programming languages have problems and programmers cannot assume that they are protected against them. And nothing in the current international process of standardizing languages will prevent this from happening in the future.
  • 10. CODE STRUCTURE There are many different kinds of structural measures, each of which tells us something about the effort required to write the code in the first place, to understand the code when making a change, or to test the code using particular tools or techniques. It is often assumed that a large module takes longer to specify, design, code and test than a smaller one. But in fact the code's structure plays a big part. There are several aspects of code structure to consider:  control flow structure;  data flow structure;  data structure.  The important thing for the tester is to be aware that the above mentioned static analysis measures can be used as early warning signals of how good the code is likely to be when it is finished.  In summary the value of static analysis is especially for:  early detection of defects prior to test execution;  early warning about suspicious aspects of the code, design or requirements;  identification of defects not easily found in dynamic testing;  improved maintainability of code and design since engineers work according to documented standards and rules;  prevention of defects, provided that engineers are willing to learn from their errors and continuous improvement is practised.