Sunteți pe pagina 1din 4

white-box-testing-v022971Scribd Upload a Document Search Documents Explore Documents Books - Fiction Books - Non-fiction Health & Medicine Brochures/Catalogs

Government Docs How-To Guides/Manuals Magazines/Newspapers Recipes/Menus School Work + all categories Featured Recent People Authors Students Researchers Publishers Government & Nonprofits Businesses Musicians Artists & Designers Teachers + all categories Most Followed Popular Sign Up | Log In 1First Page Previous Page Next Page / 14Sections not available Zoom Out Zoom In Fullscreen Exit Fullscreen Select View Mode View Mode Slideshow Scroll Readcast Add a Comment Embed & Share Reading should be social! Post a message on your social networks to let others know what you're reading. Select the sites below and start sharing. Readcast this Document Login to Add a CommentShare & Embed Add to Collections Download this Document for FreeAuto-hide: on

ThoughtWorks, 2007 White box testing ThoughtWorks, 2007 Objective What is White box testing Techniques of white box testing What is Grey Box testing ThoughtWorks, 2007 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? ThoughtWorks, 2007 Techniques Statement coverage Loop testing Path testing Branch testing ThoughtWorks, 2007 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; } ThoughtWorks, 2007 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 ThoughtWorks, 2007 Path testing Make sure all the paths are covered. Determine the paths Construct a logic flow chart ThoughtWorks, 2007 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\n, Mean); } else printf (No scores found in file\n); } 1 2 3 4 5 7 6 8 9 ThoughtWorks, 2007 Path testing: Logic flow diagram Start 23 4 5 67 8 9 Exit 1 F T F T F T ThoughtWorks, 2007 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 ThoughtWorks, 2007 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 ThoughtWorks, 2007 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 ThoughtWorks, 2007 Grey box testing: My examples Testing I did! Test the inventory by using the inventory table Reservation retrieval Data encryption: Credit Card number white-box-testing-v022971Download this Document for FreePrintMobileCollectionsReport DocumentReport this document? Please tell us reason(s) for reporting this document Spam or junk Porn adult content Hateful or offensive If you are the copyright owner of this document and want to report it, please

follow these directions to submit a copyright infringement notice. Report Cancel This is a private document. Info and Rating Reads:840Uploaded:10/16/2008Category:Uncategorized.Rated:Copyright:Attribution Non-commercial About white box Testing Followapi_11797_Vijay Share & Embed Related Documents PreviousNext p. p. p. p. p. p. p. p. p. p. p. p. p. p. p. p. p. p. p. p. More from this user PreviousNext5 p.7 p.157 p.1 p.288 p.24 p.8 p.67 p.40 p.13 p.27 p.184 p.92 p.3 p.11 p.14 p.6 p.73 p.16 p.1 p.5 p.1 p.19 p.39 p.517 p. Add a Comment SubmitCharacters: 400 Print this document High Quality Open the downloaded document, and select print from the file menu (PDF reader required). Download and Print Sign up Use your Facebook login and see what your friends are reading and sharing. Other login options Login with Facebook Signup I don't have a Facebook account email address (required) create username (required) password (required) Send me the Scribd Newsletter, and occasional account related communications. Sign Up Privacy policy You will receive email notifications regarding your account activity. You can manage these notifications in your account settings. We promise to respect your privacy. Why Sign up? Discover and connect with people of similar interests. Publish your documents quickly and easily. Share your reading interests on Scribd and social sites. Already have a Scribd account? email address or username password Log In Trouble logging in? Login Successful Now bringing you back...

Back to LoginReset your password Please enter your email address below to reset your password. We will send you an email with instructions on how to continue. Email address: You need to provide a login for this account as well. Login: Submit Upload a Document Search Documents Follow Us!scribd.com/scribdtwitter.com/scribdfacebook.com/scribdAboutPressBlogPartner sScribd 101Web StuffScribd StoreSupportFAQDevelopers / APIJobsTermsCopyrightPrivacyCopyright 2011 Scribd Inc.Language:EnglishChoose the language in which you want to experience Scribd:EnglishEspaolPortugus (Brasil)

S-ar putea să vă placă și