SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Static White Box Testing
 White-box testing is the process of carefully and
methodically reviewing the software design,
architecture, or code for bugs without executing it. It's
sometimes referred to as structural analysis.
 White-box (or clear-box) testing implies having access
to the code, being able to see it and review it
 The obvious reason to perform white-box testing is to
find bugs early and to find bugs that would be difficult
to uncover or isolate with black-box testing.
White Box Testing (Cont..)
 Testing design of the software at this early stage of
development is highly cost effective.
 Development teams vary in who has the responsibility
for white-box testing.
 In some teams the programmers are the ones who
organize and run the reviews
 Inviting the software testers as independent observers.
 In other teams the software testers are the ones who
perform this task and
 The programmer who wrote the code and a couple of
his peers to assist in the reviews.
Formal Reviews
 A formal review is the process under which
white-box testing is performed.
 Formal review can range from a simple
meeting between two programmers to a
detailed, rigorous inspection of the software's
design or its code.
 If the reviews are run properly, they can prove
to be a great way to find bugs early.
Formal Reviews (Cont..)
 Four essential elements of formal review:
– Identify Problems. The goal of the review is to find problems with the
software not just items that are wrong, but missing items as well.
– Follow Rules. A fixed set of rules should be followed. They may set
the amount of code to be reviewed ,how much time will be spent, what
can be commented on, and so on.
– Prepare. Each participant is expected to prepare for and contribute to
the review. They need to know what their duties and responsibilities
areand be ready to actively fulfill them at the review.
– Write a Report. The review group must produce a written report
summarizing the results of the review and make that report available
to the rest of the product development team.
Formal Reviews (Cont..)
 Formal reviews are the first nets used in catching
bugs.
Formal Reviews (Cont..)
 In addition to finding problems, holding formal
reviews has a few indirect results:
– Communications. Information not contained in the
formal report is communicated. Inexperienced
programmers may learn new techniques from more
experienced programmers.
– Team Trust. If a review is run properly, it can be a
good place for testers and programmers to build
respect for each other's skills and to better
understand each other's jobs and job needs.
Peer Reviews
 The easiest way to get team members together and
doing their first formal reviews of the software is peer
reviews.
 Sometimes called buddy reviews.
 This method is really more of an "I'll show you mine if
you show me yours" type discussion.
 Peer reviews are often held with just the programmer
who designed the architecture or wrote the code and
one or two other programmers or testers acting as
reviewers.
Walkthroughs
 Walkthroughs are the next step up from peer reviews.
 In a walkthrough, the programmer who wrote the code
formally presents it to a small group of five or so other
programmers and testers.
 The reviewers should receive copies of the software in
advance of the review.
 Having at least one senior programmer as a reviewer is
very important.
Walkthroughs (Cont..)
 The presenter reads through the code line by
line, or function by function, explaining what
the code does and why.
 The reviewers listen and question anything that
looks suspicious.
 It's also very important that after the review the
presenter write a report telling what was found
and how he plans to address any bugs
discovered.
Inspections
 Inspections are the most formal type of reviews.
 They are highly structured and require training for each
participant.
 Inspections are different from peer reviews and
walkthroughs.
 The person who presents the code, isn't the original
programmer.
 The other participants are called inspectors.
 Each is tasked with reviewing the code from a different
perspective, such as a user, a tester, or a product
support person.
Inspections (cont..)
 This helps bring different views of the product under
review and very often identifies different bugs.
 One inspector is even tasked with reviewing the code
backward that is, from the end to the beginning to
make sure that the material is covered evenly and
completely.
 Some inspectors are also assigned tasks such as
moderator and recorder to assure that the rules are
followed and that the review is run effectively.
Inspections (cont..)
 After the inspection meeting, the inspectors
might meet again to discuss the defects they
found. and to work with the moderator to
prepare a written report.
 The programmer then makes the changes and
the moderator verifies that they were properly
made.
 Re-inspection may be needed to locate any
remaining bugs.
Inspections (cont..)
 Inspections have proven to be very effective in
finding bugs.
 Especially design documents and code.
 Inspections are gaining popularity as
companies and product development teams
discover their benefits.
Generic Code Review Checklist
 Is an un-initialized variable referenced?
Looking for omissions is just as important as
looking for errors.
 Are array and string subscripts integer values
and are they always within the bounds of the
array's or string's dimension?
 Are there any potential "off by one" errors in
indexing operations or subscript references to
arrays?
Generic Code Review Checklist
(cont..)
 Is a variable used where a constant would actually
work better for example, when checking the boundary
of an array?
 Is a variable ever assigned a value that's of a different
type than the variable? For example, does the code
accidentally assign a floating-point number to an
integer variable?
 Is memory allocated for referenced pointers?
 If a data structure is referenced in multiple functions or
subroutines, is the structure defined identically in each
one?
Data Declaration Errors
 Are all the variables assigned the correct length, type,
and storage class? For example, should a variable be
declared as a string instead of an array of characters?
 If a variable is initialized at the same time as it's
declared, is it properly initialized and consistent with its
type?
 Are there any variables with similar names? This isn't
necessarily a bug, but it could be a sign that the names
have been confused with those from somewhere else
in the program.
Data Declaration Errors (Cont..)
 Are any variables declared that are never
referenced or are referenced only once?
 Are all the variables explicitly declared within
their specific module? If not, is it understood
that the variable is shared with the next higher
module?
Computation Errors
 Do any calculations that use variables have different
data types, such as adding an integer to a floating-
point number?
 Do any calculations that use variables have the same
data type but are different lengths adding a byte to a
word, for example?
 Are the compiler's conversion rules for variables of
inconsistent type or length understood and taken into
account in any calculations?
 Is the target variable of an assignment smaller than the
right-hand expression?
Computation Errors (cont..)
 Is overflow or underflow in the middle of a numeric calculation
possible?
 Is it ever possible for a divisor/modulus to be zero?
 For cases of integer arithmetic, does the code handle that some
calculations, particularly division, will result in loss of precision?
 Can a variable's value go outside its meaningful range? For
example, could the result of a probability be less than 0% or
greater than 100%?
 For expressions containing multiple operators, is there any
confusion about the order of evaluation and is operator
precedence correct? Are parentheses needed for clarification?
Comparison Errors
 Are the comparisons correct? It may sound pretty simple, but
there's always confusion over whether a comparison should be
less than or less than or equal to.
 Are there comparisons between fractional or floating-point values?
If so, will any precision problems affect their comparison? Is
1.00000001 close enough to 1.00000002 to be equal?
 Does each Boolean expression state what it should state? Does
the Boolean calculation work as expected? Is there any doubt
about the order of evaluation?
 Are the operands of a Boolean operator Boolean? For example, is
an integer variable containing integer values being used in a
Boolean calculation?
Control Flow Errors
 If the language contains statement groups
such as begin...end and do...while, are the
ends explicit and do they match their
appropriate groups?
 Will the program, module, subroutine, or loop
eventually terminate? If it won't, is that
acceptable?
 Is there a possibility of premature loop exit?
Control Flow Errors (cont..)
 Is it possible that a loop never executes? Is it
acceptable if it doesn't?
 If the program contains a multi-way branch
such as a switch...case statement, can the
index variable ever exceed the number of
branch possibilities? If it does, is this case
handled properly?
 Are there any "off by one" errors that would
cause unexpected flow through the loop?
Subroutine Parameter Errors
 Do the types and sizes of parameters received
by a subroutine match those sent by the calling
code? Is the order correct?
 If constants are ever passed as arguments, are
they accidentally changed in the subroutine?
Subroutine Parameter Errors (cont)
 Does a subroutine alter a parameter that's
intended only as an input value?
 Do the units of each parameter match the units
of each corresponding argument English
versus metric, for example?
 If global variables are present, do they have
similar definitions and attributes in all
referencing subroutines?
Input/Output Errors
 Does the software strictly adhere to the specified format of the
data being read or written by the external device?
 If the file or peripheral isn't present or ready, is that error condition
handled?
 Does the software handle the situation of the external device
being disconnected, not available, or full during a read or write?
 Are all conceivable errors handled by the software in an expected
way?
 Have all error messages been checked for correctness,
appropriateness, grammar, and spelling?
Other Checks
 Will the software work with languages other
than English? Does it handle extended ASCII
characters? Does it need to use Unicode
instead of ASCII?
 If the software is intended to be portable to
other compilers and CPUs, have allowances
been made for this? Portability, if required, can
be a huge issue if not planned and tested for.
Other Checks (cont..)
 Has compatibility been considered so that the software
will operate with different amounts of available
memory, different internal hardware such as graphics
and sound cards, and different peripherals such as
printers and modems?
 Does compilation of the program produce any
"warning" or "informational" messages? They usually
indicate that something questionable is being done.
Purists would argue that any warning message is
unacceptable.

Weitere ähnliche Inhalte

Was ist angesagt?

Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systemsmridul mishra
 
Virtual machines and their architecture
Virtual machines and their architectureVirtual machines and their architecture
Virtual machines and their architectureMrinmoy Dalal
 
booting steps of a computer
booting steps of a computerbooting steps of a computer
booting steps of a computerAnusha Babooa
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
Aspect oriented architecture
Aspect oriented architecture Aspect oriented architecture
Aspect oriented architecture tigneb
 
Centralised and distributed databases
Centralised and distributed databasesCentralised and distributed databases
Centralised and distributed databasesForrester High School
 
Software Testing Tools | Edureka
Software Testing Tools | EdurekaSoftware Testing Tools | Edureka
Software Testing Tools | EdurekaEdureka!
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration ManagementChandan Chaurasia
 
Ch 4 components of the sqa system
Ch 4 components of the sqa systemCh 4 components of the sqa system
Ch 4 components of the sqa systemKittitouch Suteeca
 
Characterizing the Software Process: A Maturity Framework
Characterizing the Software Process:  A Maturity FrameworkCharacterizing the Software Process:  A Maturity Framework
Characterizing the Software Process: A Maturity FrameworkSachin Hiriyanna
 
Software testing principles
Software testing principlesSoftware testing principles
Software testing principlesDonato Di Pierro
 

Was ist angesagt? (20)

Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systems
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Software testing
Software testingSoftware testing
Software testing
 
Google File System
Google File SystemGoogle File System
Google File System
 
Virtual machines and their architecture
Virtual machines and their architectureVirtual machines and their architecture
Virtual machines and their architecture
 
booting steps of a computer
booting steps of a computerbooting steps of a computer
booting steps of a computer
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 
Aspect oriented architecture
Aspect oriented architecture Aspect oriented architecture
Aspect oriented architecture
 
Centralised and distributed databases
Centralised and distributed databasesCentralised and distributed databases
Centralised and distributed databases
 
Software Testing Tools | Edureka
Software Testing Tools | EdurekaSoftware Testing Tools | Edureka
Software Testing Tools | Edureka
 
Fault tolerance
Fault toleranceFault tolerance
Fault tolerance
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
 
Thin client
Thin clientThin client
Thin client
 
Ch 4 components of the sqa system
Ch 4 components of the sqa systemCh 4 components of the sqa system
Ch 4 components of the sqa system
 
Software testing
Software testingSoftware testing
Software testing
 
Testing
TestingTesting
Testing
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Characterizing the Software Process: A Maturity Framework
Characterizing the Software Process:  A Maturity FrameworkCharacterizing the Software Process:  A Maturity Framework
Characterizing the Software Process: A Maturity Framework
 
Software testing principles
Software testing principlesSoftware testing principles
Software testing principles
 

Ähnlich wie Static white box testing lecture 12

S D D Program Development Tools
S D D  Program  Development  ToolsS D D  Program  Development  Tools
S D D Program Development Toolsgavhays
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3REHAN IJAZ
 
Different Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingDifferent Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingRachel Davis
 
Peering into the white box: A testers approach to Code Reviews
Peering into the white box: A testers approach to Code ReviewsPeering into the white box: A testers approach to Code Reviews
Peering into the white box: A testers approach to Code ReviewsAlan Page
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxssrpr
 
Reading Summary - Effective Software Defect Tracking + Pragmatic Unit Testing
Reading Summary - Effective Software Defect Tracking + Pragmatic Unit TestingReading Summary - Effective Software Defect Tracking + Pragmatic Unit Testing
Reading Summary - Effective Software Defect Tracking + Pragmatic Unit TestingArtemisa Yescas Engler
 
7a Good Programming Practice.pptx
7a Good Programming Practice.pptx7a Good Programming Practice.pptx
7a Good Programming Practice.pptxDylanTilbury1
 
Code Review
Code ReviewCode Review
Code ReviewRavi Raj
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersSachin Gupta
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersTripti Shergill
 
Manuel testing word
Manuel testing wordManuel testing word
Manuel testing wordVijay R
 
Testing parallel programs
Testing parallel programsTesting parallel programs
Testing parallel programsPVS-Studio
 

Ähnlich wie Static white box testing lecture 12 (20)

Unit iv
Unit ivUnit iv
Unit iv
 
S D D Program Development Tools
S D D  Program  Development  ToolsS D D  Program  Development  Tools
S D D Program Development Tools
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3
 
Different Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingDifferent Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application Testing
 
Peering into the white box: A testers approach to Code Reviews
Peering into the white box: A testers approach to Code ReviewsPeering into the white box: A testers approach to Code Reviews
Peering into the white box: A testers approach to Code Reviews
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptx
 
Testing overview
Testing overviewTesting overview
Testing overview
 
Reading Summary - Effective Software Defect Tracking + Pragmatic Unit Testing
Reading Summary - Effective Software Defect Tracking + Pragmatic Unit TestingReading Summary - Effective Software Defect Tracking + Pragmatic Unit Testing
Reading Summary - Effective Software Defect Tracking + Pragmatic Unit Testing
 
7a Good Programming Practice.pptx
7a Good Programming Practice.pptx7a Good Programming Practice.pptx
7a Good Programming Practice.pptx
 
Ensuring code quality
Ensuring code qualityEnsuring code quality
Ensuring code quality
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
 
Code Review
Code ReviewCode Review
Code Review
 
test
testtest
test
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answers
 
Manual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answersManual software-testing-interview-questions-with-answers
Manual software-testing-interview-questions-with-answers
 
test
testtest
test
 
Manuel testing word
Manuel testing wordManuel testing word
Manuel testing word
 
Testing parallel programs
Testing parallel programsTesting parallel programs
Testing parallel programs
 

Mehr von Abdul Basit

Atlassian git cheatsheet
Atlassian git cheatsheetAtlassian git cheatsheet
Atlassian git cheatsheetAbdul Basit
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheetAbdul Basit
 
White box testing
White box testingWhite box testing
White box testingAbdul Basit
 
Testing the documentation
Testing the documentationTesting the documentation
Testing the documentationAbdul Basit
 
Testing software security
Testing software securityTesting software security
Testing software securityAbdul Basit
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentalsAbdul Basit
 
Test cases planning
Test cases planningTest cases planning
Test cases planningAbdul Basit
 
Software Testing
Software TestingSoftware Testing
Software TestingAbdul Basit
 
Software Compatibility testing
Software Compatibility testingSoftware Compatibility testing
Software Compatibility testingAbdul Basit
 
Black box testing
Black box testingBlack box testing
Black box testingAbdul Basit
 
Software Automated testing and tools
Software Automated testing and toolsSoftware Automated testing and tools
Software Automated testing and toolsAbdul Basit
 
Why test software
Why test softwareWhy test software
Why test softwareAbdul Basit
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer CheatsheetAbdul Basit
 
Software testing lecture 10
Software testing lecture 10Software testing lecture 10
Software testing lecture 10Abdul Basit
 
Software testing lecture 9
Software testing lecture 9Software testing lecture 9
Software testing lecture 9Abdul Basit
 
Software quality assurance lecture 1
Software quality assurance lecture 1Software quality assurance lecture 1
Software quality assurance lecture 1Abdul Basit
 
Software measurement lecture 7
Software measurement lecture 7Software measurement lecture 7
Software measurement lecture 7Abdul Basit
 
Planning for software quality assurance lecture 6
Planning for software quality assurance lecture 6Planning for software quality assurance lecture 6
Planning for software quality assurance lecture 6Abdul Basit
 

Mehr von Abdul Basit (20)

Atlassian git cheatsheet
Atlassian git cheatsheetAtlassian git cheatsheet
Atlassian git cheatsheet
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
 
White box testing
White box testingWhite box testing
White box testing
 
Web testing
Web testingWeb testing
Web testing
 
Testing the documentation
Testing the documentationTesting the documentation
Testing the documentation
 
Testing software security
Testing software securityTesting software security
Testing software security
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
 
Test planning
Test planningTest planning
Test planning
 
Test cases planning
Test cases planningTest cases planning
Test cases planning
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Software Compatibility testing
Software Compatibility testingSoftware Compatibility testing
Software Compatibility testing
 
Black box testing
Black box testingBlack box testing
Black box testing
 
Software Automated testing and tools
Software Automated testing and toolsSoftware Automated testing and tools
Software Automated testing and tools
 
Why test software
Why test softwareWhy test software
Why test software
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer Cheatsheet
 
Software testing lecture 10
Software testing lecture 10Software testing lecture 10
Software testing lecture 10
 
Software testing lecture 9
Software testing lecture 9Software testing lecture 9
Software testing lecture 9
 
Software quality assurance lecture 1
Software quality assurance lecture 1Software quality assurance lecture 1
Software quality assurance lecture 1
 
Software measurement lecture 7
Software measurement lecture 7Software measurement lecture 7
Software measurement lecture 7
 
Planning for software quality assurance lecture 6
Planning for software quality assurance lecture 6Planning for software quality assurance lecture 6
Planning for software quality assurance lecture 6
 

Kürzlich hochgeladen

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Kürzlich hochgeladen (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Static white box testing lecture 12

  • 1. Static White Box Testing  White-box testing is the process of carefully and methodically reviewing the software design, architecture, or code for bugs without executing it. It's sometimes referred to as structural analysis.  White-box (or clear-box) testing implies having access to the code, being able to see it and review it  The obvious reason to perform white-box testing is to find bugs early and to find bugs that would be difficult to uncover or isolate with black-box testing.
  • 2. White Box Testing (Cont..)  Testing design of the software at this early stage of development is highly cost effective.  Development teams vary in who has the responsibility for white-box testing.  In some teams the programmers are the ones who organize and run the reviews  Inviting the software testers as independent observers.  In other teams the software testers are the ones who perform this task and  The programmer who wrote the code and a couple of his peers to assist in the reviews.
  • 3. Formal Reviews  A formal review is the process under which white-box testing is performed.  Formal review can range from a simple meeting between two programmers to a detailed, rigorous inspection of the software's design or its code.  If the reviews are run properly, they can prove to be a great way to find bugs early.
  • 4. Formal Reviews (Cont..)  Four essential elements of formal review: – Identify Problems. The goal of the review is to find problems with the software not just items that are wrong, but missing items as well. – Follow Rules. A fixed set of rules should be followed. They may set the amount of code to be reviewed ,how much time will be spent, what can be commented on, and so on. – Prepare. Each participant is expected to prepare for and contribute to the review. They need to know what their duties and responsibilities areand be ready to actively fulfill them at the review. – Write a Report. The review group must produce a written report summarizing the results of the review and make that report available to the rest of the product development team.
  • 5. Formal Reviews (Cont..)  Formal reviews are the first nets used in catching bugs.
  • 6. Formal Reviews (Cont..)  In addition to finding problems, holding formal reviews has a few indirect results: – Communications. Information not contained in the formal report is communicated. Inexperienced programmers may learn new techniques from more experienced programmers. – Team Trust. If a review is run properly, it can be a good place for testers and programmers to build respect for each other's skills and to better understand each other's jobs and job needs.
  • 7. Peer Reviews  The easiest way to get team members together and doing their first formal reviews of the software is peer reviews.  Sometimes called buddy reviews.  This method is really more of an "I'll show you mine if you show me yours" type discussion.  Peer reviews are often held with just the programmer who designed the architecture or wrote the code and one or two other programmers or testers acting as reviewers.
  • 8. Walkthroughs  Walkthroughs are the next step up from peer reviews.  In a walkthrough, the programmer who wrote the code formally presents it to a small group of five or so other programmers and testers.  The reviewers should receive copies of the software in advance of the review.  Having at least one senior programmer as a reviewer is very important.
  • 9. Walkthroughs (Cont..)  The presenter reads through the code line by line, or function by function, explaining what the code does and why.  The reviewers listen and question anything that looks suspicious.  It's also very important that after the review the presenter write a report telling what was found and how he plans to address any bugs discovered.
  • 10. Inspections  Inspections are the most formal type of reviews.  They are highly structured and require training for each participant.  Inspections are different from peer reviews and walkthroughs.  The person who presents the code, isn't the original programmer.  The other participants are called inspectors.  Each is tasked with reviewing the code from a different perspective, such as a user, a tester, or a product support person.
  • 11. Inspections (cont..)  This helps bring different views of the product under review and very often identifies different bugs.  One inspector is even tasked with reviewing the code backward that is, from the end to the beginning to make sure that the material is covered evenly and completely.  Some inspectors are also assigned tasks such as moderator and recorder to assure that the rules are followed and that the review is run effectively.
  • 12. Inspections (cont..)  After the inspection meeting, the inspectors might meet again to discuss the defects they found. and to work with the moderator to prepare a written report.  The programmer then makes the changes and the moderator verifies that they were properly made.  Re-inspection may be needed to locate any remaining bugs.
  • 13. Inspections (cont..)  Inspections have proven to be very effective in finding bugs.  Especially design documents and code.  Inspections are gaining popularity as companies and product development teams discover their benefits.
  • 14. Generic Code Review Checklist  Is an un-initialized variable referenced? Looking for omissions is just as important as looking for errors.  Are array and string subscripts integer values and are they always within the bounds of the array's or string's dimension?  Are there any potential "off by one" errors in indexing operations or subscript references to arrays?
  • 15. Generic Code Review Checklist (cont..)  Is a variable used where a constant would actually work better for example, when checking the boundary of an array?  Is a variable ever assigned a value that's of a different type than the variable? For example, does the code accidentally assign a floating-point number to an integer variable?  Is memory allocated for referenced pointers?  If a data structure is referenced in multiple functions or subroutines, is the structure defined identically in each one?
  • 16. Data Declaration Errors  Are all the variables assigned the correct length, type, and storage class? For example, should a variable be declared as a string instead of an array of characters?  If a variable is initialized at the same time as it's declared, is it properly initialized and consistent with its type?  Are there any variables with similar names? This isn't necessarily a bug, but it could be a sign that the names have been confused with those from somewhere else in the program.
  • 17. Data Declaration Errors (Cont..)  Are any variables declared that are never referenced or are referenced only once?  Are all the variables explicitly declared within their specific module? If not, is it understood that the variable is shared with the next higher module?
  • 18. Computation Errors  Do any calculations that use variables have different data types, such as adding an integer to a floating- point number?  Do any calculations that use variables have the same data type but are different lengths adding a byte to a word, for example?  Are the compiler's conversion rules for variables of inconsistent type or length understood and taken into account in any calculations?  Is the target variable of an assignment smaller than the right-hand expression?
  • 19. Computation Errors (cont..)  Is overflow or underflow in the middle of a numeric calculation possible?  Is it ever possible for a divisor/modulus to be zero?  For cases of integer arithmetic, does the code handle that some calculations, particularly division, will result in loss of precision?  Can a variable's value go outside its meaningful range? For example, could the result of a probability be less than 0% or greater than 100%?  For expressions containing multiple operators, is there any confusion about the order of evaluation and is operator precedence correct? Are parentheses needed for clarification?
  • 20. Comparison Errors  Are the comparisons correct? It may sound pretty simple, but there's always confusion over whether a comparison should be less than or less than or equal to.  Are there comparisons between fractional or floating-point values? If so, will any precision problems affect their comparison? Is 1.00000001 close enough to 1.00000002 to be equal?  Does each Boolean expression state what it should state? Does the Boolean calculation work as expected? Is there any doubt about the order of evaluation?  Are the operands of a Boolean operator Boolean? For example, is an integer variable containing integer values being used in a Boolean calculation?
  • 21. Control Flow Errors  If the language contains statement groups such as begin...end and do...while, are the ends explicit and do they match their appropriate groups?  Will the program, module, subroutine, or loop eventually terminate? If it won't, is that acceptable?  Is there a possibility of premature loop exit?
  • 22. Control Flow Errors (cont..)  Is it possible that a loop never executes? Is it acceptable if it doesn't?  If the program contains a multi-way branch such as a switch...case statement, can the index variable ever exceed the number of branch possibilities? If it does, is this case handled properly?  Are there any "off by one" errors that would cause unexpected flow through the loop?
  • 23. Subroutine Parameter Errors  Do the types and sizes of parameters received by a subroutine match those sent by the calling code? Is the order correct?  If constants are ever passed as arguments, are they accidentally changed in the subroutine?
  • 24. Subroutine Parameter Errors (cont)  Does a subroutine alter a parameter that's intended only as an input value?  Do the units of each parameter match the units of each corresponding argument English versus metric, for example?  If global variables are present, do they have similar definitions and attributes in all referencing subroutines?
  • 25. Input/Output Errors  Does the software strictly adhere to the specified format of the data being read or written by the external device?  If the file or peripheral isn't present or ready, is that error condition handled?  Does the software handle the situation of the external device being disconnected, not available, or full during a read or write?  Are all conceivable errors handled by the software in an expected way?  Have all error messages been checked for correctness, appropriateness, grammar, and spelling?
  • 26. Other Checks  Will the software work with languages other than English? Does it handle extended ASCII characters? Does it need to use Unicode instead of ASCII?  If the software is intended to be portable to other compilers and CPUs, have allowances been made for this? Portability, if required, can be a huge issue if not planned and tested for.
  • 27. Other Checks (cont..)  Has compatibility been considered so that the software will operate with different amounts of available memory, different internal hardware such as graphics and sound cards, and different peripherals such as printers and modems?  Does compilation of the program produce any "warning" or "informational" messages? They usually indicate that something questionable is being done. Purists would argue that any warning message is unacceptable.