SlideShare uma empresa Scribd logo
1 de 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 floatingpoint 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.

Mais conteúdo relacionado

Mais procurados

Manual Testing Notes
Manual Testing NotesManual Testing Notes
Manual Testing Notesguest208aa1
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metricsIndu Sharma Bhardwaj
 
Formal Approaches to SQA.pptx
Formal Approaches to SQA.pptxFormal Approaches to SQA.pptx
Formal Approaches to SQA.pptxKarthigaiSelviS3
 
Understand regression testing
Understand regression testingUnderstand regression testing
Understand regression testinggaoliang641
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and typesConfiz
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testingHaris Jamil
 
Bug reporting and tracking
Bug reporting and trackingBug reporting and tracking
Bug reporting and trackingVadym Muliavka
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Ankit Prajapati
 
Bug life cycle
Bug life cycleBug life cycle
Bug life cycleBugRaptors
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance Webtech Learning
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4 Mohammad Faizan
 
Defect life cycle and Defect Status Life Cycle
Defect life cycle and Defect Status Life CycleDefect life cycle and Defect Status Life Cycle
Defect life cycle and Defect Status Life Cyclepavansmiles
 
What is integration testing
What is integration testingWhat is integration testing
What is integration testingTestingXperts
 

Mais procurados (20)

Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Manual Testing Notes
Manual Testing NotesManual Testing Notes
Manual Testing Notes
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
 
Formal Approaches to SQA.pptx
Formal Approaches to SQA.pptxFormal Approaches to SQA.pptx
Formal Approaches to SQA.pptx
 
Understand regression testing
Understand regression testingUnderstand regression testing
Understand regression testing
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
1.basics of software testing
1.basics of software testing 1.basics of software testing
1.basics of software testing
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
 
Bug reporting and tracking
Bug reporting and trackingBug reporting and tracking
Bug reporting and tracking
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
 
Software testing
Software testingSoftware testing
Software testing
 
Bug life cycle
Bug life cycleBug life cycle
Bug life cycle
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance
 
Manual testing
Manual testingManual testing
Manual testing
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Defect life cycle and Defect Status Life Cycle
Defect life cycle and Defect Status Life CycleDefect life cycle and Defect Status Life Cycle
Defect life cycle and Defect Status Life Cycle
 
What is integration testing
What is integration testingWhat is integration testing
What is integration testing
 
Static analysis
Static analysisStatic analysis
Static analysis
 
Test cases
Test casesTest cases
Test cases
 

Destaque (6)

Requirement modeling
Requirement modelingRequirement modeling
Requirement modeling
 
software testing strategies
software testing strategiessoftware testing strategies
software testing strategies
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Black & White Box testing
Black & White Box testingBlack & White Box testing
Black & White Box testing
 
Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 

Semelhante a White box testing

Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
S D D Program Development Tools
S D D  Program  Development  ToolsS D D  Program  Development  Tools
S D D Program Development Toolsgavhays
 
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
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3REHAN IJAZ
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxssrpr
 
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
 
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
 
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
 
Code Review
Code ReviewCode Review
Code ReviewRavi Raj
 
Testing parallel programs
Testing parallel programsTesting parallel programs
Testing parallel programsPVS-Studio
 

Semelhante a White box testing (20)

Unit iv
Unit ivUnit iv
Unit iv
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
S D D Program Development Tools
S D D  Program  Development  ToolsS D D  Program  Development  Tools
S D D Program Development Tools
 
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
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3
 
Testing overview
Testing overviewTesting overview
Testing overview
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptx
 
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
 
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
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
 
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
 
test
testtest
test
 
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
 
Manuel testing word
Manuel testing wordManuel testing word
Manuel testing word
 
Code Review
Code ReviewCode Review
Code Review
 
Testing parallel programs
Testing parallel programsTesting parallel programs
Testing parallel programs
 

Mais de 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
 
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
 
Static white box testing lecture 12
Static white box testing lecture 12Static white box testing lecture 12
Static white box testing lecture 12Abdul 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
 

Mais de 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
 
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
 
Static white box testing lecture 12
Static white box testing lecture 12Static white box testing lecture 12
Static white box testing lecture 12
 
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
 

Último

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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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 Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Último (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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.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
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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 Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

White box testing

  • 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 floatingpoint 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.