White Box Testing V0.2

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

1 Favorite

White Box Testing V0.2 - Presentation Transcript

  1. White box testing
  2. Objective
    • What is White box testing
    • Techniques of white box testing
    • What is Grey Box testing
    • Testing the internal structure of the software
    • Understand the code and the code will set you free!
    • White-box testing is testing that takes into account the internal mechanism of a system or component
    • It’s also known as Structural testing, clear box testing and glass box testing
    What is it?
  3. Techniques
    • Statement coverage
    • Loop testing
    • Path testing
    • Branch testing
  4. Statement Coverage
    • 100% method coverage: All methods in all classes are called.
    • 100% statement coverage: All statements in a method are executed.
    • void foo (int a, b, c, d, e) {
    • if (a == 0) {
    • return; }
    • int x = 0;
    • if ((a==b) OR ((c==d) AND bug(a) )) {
    • x =1; }
    • e = 1/x; }
  5. Loop testing
    • Test the ‘ for’ and ‘ while’ loops in the code.
    • Look for exceptions of infinite loop.
    • Cause execution of loop to be skipped.
    • Loop to be executed exactly once.
    • Loop to be executed more than once
  6. Path testing
    • Make sure all the paths are covered.
    • Determine the paths
    • Construct a logic flow chart
  7. Path testing: Determine Paths
    • FindMean (FILE ScoreFile)
    • { float SumOfScores = 0.0;
      • int NumberOfScores = 0;
      • float Mean=0.0; float Score;
      • Read(ScoreFile, Score);
      • while (! EOF(ScoreFile) {
        • if (Score > 0.0 ) {
            • SumOfScores = SumOfScores + Score;
            • NumberOfScores++;
            • }
        • Read(ScoreFile, Score);
      • }
      • /* Compute the mean and print the result */
      • if (NumberOfScores > 0) {
          • Mean = SumOfScores / NumberOfScores;
          • printf(“ The mean score is %f ”, Mean);
      • } else
          • printf (“No scores found in file ”);
    • }
    1 2 3 4 5 7 6 8 9
  8. Path testing: Logic flow diagram
  9. Branch testing
    • Also known as Conditional Testing
    • Make sure that each possible outcome from a condition is tested at least once.
    • if (i=true)
    • printf (“I am true”)
    • else
    • printf (“I am false”)
    • Possible Testcases are
    • 1. i=true; 2. i=false
  10. Grey box testing
    • What is it?
      • Mixture of both black box and white box.
      • Test the system with a basic outlook of internals.
    • When you do?
      • Once the functionality is developed
    • Example
      • Database testing
      • Using SQL
  11. Grey box testing: SQL
    • Some times testers may have to use SQL to help in the black box testing.
    • Types of Grey box using SQL
      • Data Validation
      • Data security
      • Query for system updates
  12. Grey box testing: My examples
    • Testing I did!
      • Test the inventory by using the inventory table
      • Reservation retrieval
      • Data encryption: Credit Card number
  13. Questions?

+ nivethanivetha, 3 years ago

custom

2747 views, 1 favs, 2 embeds more stats

presented during 2 days seminar on software testing more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 2747
    • 2734 on SlideShare
    • 13 from embeds
  • Comments 1
  • Favorites 1
  • Downloads 385
Most viewed embeds
  • 12 views on http://sunny.deb.googlepages.com
  • 1 views on http://profiles.friendster.com

more

All embeds
  • 12 views on http://sunny.deb.googlepages.com
  • 1 views on http://profiles.friendster.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories