<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Software design and embedded system tools. &#187; white box</title>
	<atom:link href="http://embedsoftdev.com/tag/white-box/feed/" rel="self" type="application/rss+xml" />
	<link>http://embedsoftdev.com</link>
	<description>Good information for software design</description>
	<lastBuildDate>Mon, 09 Apr 2012 23:27:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to do white box testing</title>
		<link>http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/</link>
		<comments>http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 15:27:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[advantage of branch coverage]]></category>
		<category><![CDATA[branch coverage]]></category>
		<category><![CDATA[code coverage]]></category>
		<category><![CDATA[condition coverage]]></category>
		<category><![CDATA[how to do white box test]]></category>
		<category><![CDATA[statement coverage]]></category>
		<category><![CDATA[white box]]></category>
		<category><![CDATA[white box test]]></category>
		<category><![CDATA[white box testing]]></category>

		<guid isPermaLink="false">http://embedsoftdev.com/?p=202</guid>
		<description><![CDATA[The article for today is about white box testing.I had written article about white box testing in this blog but that time it was only introduction of white box testing.This article concern with how to do white box testing. The procedure of White box testing is normally saparated into 3 topic as follow 1.Statement Coverage [...]
Related posts:<ol>
<li><a href='http://embedsoftdev.com/software-engineering/software-testing-ii-white-box-and-black-box-testing/' rel='bookmark' title='Software testing part II (White Box and Black Box testing)'>Software testing part II (White Box and Black Box testing)</a></li>
<li><a href='http://embedsoftdev.com/software-engineering/software-testing-part-i/' rel='bookmark' title='Software testing part I.'>Software testing part I.</a></li>
<li><a href='http://embedsoftdev.com/software-engineering/stubs-and-drivers-testing/' rel='bookmark' title='Stubs and Drivers testing'>Stubs and Drivers testing</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The article for today is about white box testing.I had written article about white box testing in this blog but that time it was only introduction of white box testing.This article concern with how to do white box testing.</p>
<p>   The procedure of White box testing is normally saparated into 3 topic as follow</p>
<p>1.<strong>Statement Coverage</strong><br />
   It is the testing to verify that all instructions or code must be executed at least one time.We can specify one or more than one test case for doing statement coverage testing (there may be a chance that one test case is not cover all the code we need to test).Below is an example demonstate how to do statement coverage testing.</p>
<p>Suppose you have a piece of code to test like this</p>
<div id="attachment_203" class="wp-caption aligncenter" style="width: 310px"><img src="http://embedsoftdev.com/wp-content/uploads/2009/10/untitled-300x258.jpg" alt="software engineering How to do white box testing" title="Code1" width="300" height="258" class="size-medium wp-image-203" /><p class="wp-caption-text">Code1</p></div>
<p>If you determin &#8216;C&#8217; as the test case then the coverage reach 100% (pass through all line of code) and only one test case is sufficient for doing Statement Coverage for this code.</p>
<p><strong>Advantage of Statement Coverage.</strong><br />
1.To ensure that all source code can be reached at least for one time.<br />
2.It is suitable for making Performance profiling because it can be applied directly to object code without processing source code.</p>
<p><strong>Disadvantage of Statement Coverage.</strong><br />
1.It is insensitive to logical operators such as OR (||),AND (&#038;&#038;) etc.<br />
2.If your source code have a lot of IF-ELSEIF-ELSE statements or contain consecutive switch labels then the test case used for doing Statement Coverage will be increased respectively.</p>
<p>2. <strong>Branch Coverage (Condition judgment Coverage)</strong><br />
   It is the testing to verify that all branches and instructions must be executed at least one time (Concentrate on testing to cover every branches or decision points in the code).It is the easiest way to perform testing of path or workflow of program.</p>
<p>Please consider the code below and its explanation to understand the operation of Branch Coverage testing.</p>
<div id="attachment_204" class="wp-caption aligncenter" style="width: 310px"><img src="http://embedsoftdev.com/wp-content/uploads/2009/10/untitled123-300x210.jpg" alt="software engineering How to do white box testing" title="code2" width="300" height="210" class="size-medium wp-image-204" /><p class="wp-caption-text">code2</p></div>
<p>In the above code we need only two test case to cover all the branches (also all instructions too), they are&#8230;<br />
Test case #1 : Input n1 = 1 , n2 = 1<br />
Test case #2 : Input n1 = 2 , n2 = 0</p>
<p><strong>Advantage of Branch Coverage.</strong><br />
1.To validate all branches in the code can be reached and ensure that no branches lead to abnormal of the program&#8217;s operation.<br />
2.It eliminate problems that occur with Statement Coverage testing.</p>
<p><strong>Disadvantage of Branch Coverage.</strong><br />
1.There may be other condition that can be used for decision making.For the example, statement &#8220;if((b == TRUE) || functionA())&#8221;, in this statement we can define only test case with &#8220;B = TRUE&#8221; and this test case is cover this branch but functionA() isn&#8217;t tested.</p>
<p>3.<strong>Condition Coverage/Multiple Condition Coverage</strong></p>
<p>   It is the testing to verify that all condition expression within each branch will be tested (the true and the false condition of each sub-expression within the decision branch must be tested at least one time ).<br />
It is more intensive testing than Branch Coverage and Statement Coverage.Multiple Condition Coverage has detail of testing more than Condition Coverage.Its test cases are larger than test case of Condition<br />
Coverage because it ensures that all possible combination of conditions of sub-expression within each branch must be tested.</p>
<p>Please consider the code below for Condition Coverage testing.</p>
<div id="attachment_205" class="wp-caption aligncenter" style="width: 310px"><img src="http://embedsoftdev.com/wp-content/uploads/2009/10/untitled456-300x234.jpg" alt="software engineering How to do white box testing" title="code3" width="300" height="234" class="size-medium wp-image-205" /><p class="wp-caption-text">code3</p></div>
<p>If you want to test above code by using Condition Coverage you must specify two test<br />
cases to cover all sub-expressions in this branch.The test cases are as follow…</p>
<p>Test case #1: Input n1 = 60 , n2 = 70<br />
Test case #2: Input n1 = 40 , n2 = 110</p>
<p>If you want to test above code with Multiple Condition Coverage you must specify four<br />
test cases to cover all combination of possible condition of sub-expressions in this branch and the test cases look like these</p>
<p>Test case #1: Input n1 = 60 , n2 = 70<br />
Test case #2: Input n1 = 60 , n2 = 110<br />
Test case #3: Input n1 = 40 , n2 = 70<br />
Test case #4: Input n1 = 40 , n2 = 110</p>
<p><strong>Advantage of Condition/Multiple Condition coverage.</strong><br />
1.It is very thorough testing and the bugs are normally found by this kind of testing.</p>
<p><strong>Disadvantage.. </strong><br />
1.If the decision branch contain lots of sub-expressions or has very complex boolean expressions , the tester will have to define a large number of test cases.</p>
<p>Thank you,<br />
      jitkasem pintaya.</p>
<p>Reference site:<br />
1.<a rel="nofollow" target="_blank" href="http://blog.mindblazetech.com/tag/statement-coverage/">MindBlaze Blog</a><br />
2.<a rel="nofollow" target="_blank" href="http://www.bullseye.com/coverage.html#basic_decision">Bullseye</a><br />
3.<a rel="nofollow" target="_blank" href="http://www.google.co.th/url?sa=t&#038;source=web&#038;ct=res&#038;cd=7&#038;ved=0CCcQFjAG&#038;url=http%3A%2F%2Freferaat.cs.utwente.nl%2Fnew%2Fpaper.php%3FpaperID%3D58&#038;ei=MJvUSu6xNYmE6QOs4dDWCw&#038;usg=AFQjCNF5o0Df22EvxrWGrvBtN252Q90Cfw&#038;sig2=sN8v_rOLdc_F9PC-oo9-Dg">The paper from utwente.nl by Arnold Zanderink</a></p>
<h4>Incoming search terms for the article:</h4><ul><li><a href="http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/" title="white box testing example">white box testing example</a></li><li><a href="http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/" title="how to do white box testing">how to do white box testing</a></li><li><a href="http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/" title="how to do whitebox testing">how to do whitebox testing</a></li><li><a href="http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/" title="whitebox testing example">whitebox testing example</a></li><li><a href="http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/" title="how to design test suite using white box testing">how to design test suite using white box testing</a></li></ul><p>Related posts:<ol>
<li><a href='http://embedsoftdev.com/software-engineering/software-testing-ii-white-box-and-black-box-testing/' rel='bookmark' title='Software testing part II (White Box and Black Box testing)'>Software testing part II (White Box and Black Box testing)</a></li>
<li><a href='http://embedsoftdev.com/software-engineering/software-testing-part-i/' rel='bookmark' title='Software testing part I.'>Software testing part I.</a></li>
<li><a href='http://embedsoftdev.com/software-engineering/stubs-and-drivers-testing/' rel='bookmark' title='Stubs and Drivers testing'>Stubs and Drivers testing</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software testing part II (White Box and Black Box testing)</title>
		<link>http://embedsoftdev.com/software-engineering/software-testing-ii-white-box-and-black-box-testing/</link>
		<comments>http://embedsoftdev.com/software-engineering/software-testing-ii-white-box-and-black-box-testing/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 16:16:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[another name of white box testing]]></category>
		<category><![CDATA[black box]]></category>
		<category><![CDATA[black box and white box testing]]></category>
		<category><![CDATA[black box testing]]></category>
		<category><![CDATA[disadvantage of white box testing]]></category>
		<category><![CDATA[white box]]></category>
		<category><![CDATA[white box te]]></category>
		<category><![CDATA[white box testing]]></category>

		<guid isPermaLink="false">http://embedsoftdev.com/?p=115</guid>
		<description><![CDATA[White Box testing Another name of White box testing is Glass-Box testing or Structural Testing. It is the test in the system.The tester have to specify the test case that will be used for test the system.They must have an ability in programming and well understand in software testing theory.Their task it to assign the [...]
Related posts:<ol>
<li><a href='http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/' rel='bookmark' title='How to do white box testing'>How to do white box testing</a></li>
<li><a href='http://embedsoftdev.com/software-engineering/software-testing-part-i/' rel='bookmark' title='Software testing part I.'>Software testing part I.</a></li>
<li><a href='http://embedsoftdev.com/software-engineering/stubs-and-drivers-testing/' rel='bookmark' title='Stubs and Drivers testing'>Stubs and Drivers testing</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>White Box testing</strong><br />
             Another name of White box testing is Glass-Box testing or Structural Testing.<br />
It is the test in the system.The tester have to specify the test case that will be used<br />
for test the system.They must have an ability in programming  and well understand in<br />
software testing theory.Their task it to assign the test case to every line, every<br />
statement or every path of the program being tested. You can compare white box<br />
testing with the measurement of electronics circuit (In measurement of electronics<br />
circuit,you have to measure the electric current and voltage in every node existing<br />
in your circuit).</p>
<p>               White box testing can be applied for testing in Unit testing,Integration testing<br />
or System testing but in commonly the tester apply White box testing in Unit testing phase<br />
of software development.</p>
<p><strong>The advantage of White box testing.</strong><br />
1.The process of White box testing can increase te quality of source code and can make<br />
the pieces of source code work more efficiency because it is the testing in the system<br />
(In the function and in every branches of the code)</p>
<p>2.In White box testing we can look for an error by give an input to the system and monitor<br />
the output from the system.Otherwise it also can look for the internal error that existing<br />
in the mentioned system too.</p>
<p><strong>The disadvantage of White box testing.</strong><br />
1.This kind of testing require high skill in software coding to assure the high-quality of<br />
source code.</p>
<p><strong>Black Box testing.</strong><br />
               Another name of Black-Box testing is Functional Testing.It is the testing<br />
that disregard internal mechanism of the system (don&#8217;t test the internal component<br />
of the system such as source code or function).This testing method is focus on the<br />
output that come out from the system after we sent the input to it (Output that<br />
come out after the system responded to the input data).</p>
<p>      In Black-Box Testing, the tester will not look for the code to test, so the code<br />
is considered to be &#8220;Black Box&#8221; that we can&#8217;t see the content inside the box.The<br />
tester know only they must send the input to the &#8220;Black Box&#8221; and then it will release<br />
the output to the tester.</p>
<p>      The tester usually use the requirement specification document (Requirement<br />
Knowledge) to build the test case, so they know what is the outcome that the system<br />
will send after they send the corresponding input to it. </p>
<p>      <strong>Now I can summarize the black box testing as follow&#8230;</strong><br />
      &#8211; It is the testing that disregard the source code or command<br />
in the program.<br />
      &#8211; It is testing of function of system base on the requirement documents.<br />
      &#8211; The tester must assume for output that will come out from the system<br />
after sending the various input pattern to the system (The output must match up with<br />
the input).</p>
<p><strong>Now I can summarize White Box Testing as follow&#8230;</strong><br />
        -It is the testing that examine the structure or the work-flow of the program .<br />
        -The tester must build the specific test case used for testing in each specific condition.<br />
        -The test case must contain the case that can be executed normally and abnormally.<br />
        -Try to execute every statement in the function at least 1 time.</p>
<p><img src="http://embedsoftdev.com/wp-content/uploads/2009/08/White-Box-Close-300x231.jpg" alt="software engineering Software testing part II (White Box and Black Box testing)" title="White-Box-Close" width="300" height="231" class="aligncenter size-medium wp-image-116" /></p>
<p><img src="http://embedsoftdev.com/wp-content/uploads/2009/08/272176745_09c599366a-300x267.jpg" alt="software engineering Software testing part II (White Box and Black Box testing)" title="272176745_09c599366a" width="300" height="267" class="aligncenter size-medium wp-image-121" /></p>
<p>In the next article I will write about <strong>Test first method </strong>(Software testing part III).<br />
You can see more information about Black box and White box testing at these websites below<br />
1.<a rel="nofollow" target="_blank" href="http://www.softwaretestingfundamentals.com/">Software Testing Fundamentals</a><br />
2.<a rel="nofollow" target="_blank" href="http://www.pjcj.net/yapc/npw-2008-testing_and_code_coverage/slides/">Testing and Code Coverage</a></p>
<p>Reference site: <a rel="nofollow" target="_blank" href="http://lenovoblogs.com/designmatters/?p=72">lenovoblogs</a></p>
<p>Thank you,<br />
        Jitkasem Pintaya.</p>
<h4>Incoming search terms for the article:</h4><ul><li><a href="http://embedsoftdev.com/software-engineering/software-testing-ii-white-box-and-black-box-testing/" title="white box testing">white box testing</a></li><li><a href="http://embedsoftdev.com/software-engineering/software-testing-ii-white-box-and-black-box-testing/" title="WHITE BOX">WHITE BOX</a></li></ul><p>Related posts:<ol>
<li><a href='http://embedsoftdev.com/software-engineering/how-to-do-white-box-testing/' rel='bookmark' title='How to do white box testing'>How to do white box testing</a></li>
<li><a href='http://embedsoftdev.com/software-engineering/software-testing-part-i/' rel='bookmark' title='Software testing part I.'>Software testing part I.</a></li>
<li><a href='http://embedsoftdev.com/software-engineering/stubs-and-drivers-testing/' rel='bookmark' title='Stubs and Drivers testing'>Stubs and Drivers testing</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://embedsoftdev.com/software-engineering/software-testing-ii-white-box-and-black-box-testing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

