Black Box, White Box and Gray Box Testing

 
Black Box testing refers to the technique of testing a system with no knowledge of the internals of the system. Black Box testers do not have access to the source code and are oblivious of the system architecture. A Black Box tester typically interacts with a system through a user interface by providing inputs and examining outputs without knowing where and how the inputs were operated upon. In Black Box testing, target software is exercised over a range of inputs and the outputs are observed for correctness.

Advantages

a. Efficient Testing — Well suited and efficient for large code segments or units. 

b. Unbiased Testing — clearly separates user's perspective from developer's perspective through separation of QA and Development responsibilities. 

c. Non intrusive — code access not required. 

d. Easy to execute — can be scaled to large number of moderately skilled testers with no knowledge of implementation, programming language, operating systems or networks. 

Disadvantages

a. Localized Testing — Limited code path coverage since only a limited number of test inputs are actually tested. 

b. Inefficient Test Authoring — without implementation information, exhaustive input coverage would take forever and would require tremendous resources. 

c. Blind Coverage — cannot control targeting code segments or paths which may be more error prone than others.  



White Box Testing refers to the technique of testing a system with knowledge of the internals of the system. White Box testers have access to the source code and are aware of the system architecture. A White Box tester typically analyzes source code, derives test cases from knowledge about the source code, and finally targets specific code paths to achieve a certain level of code coverage. A White Box tester with access to details about both operations can readily craft efficient test cases that exercise boundary conditions.

Advantages

a. Increased Effectiveness — Crosschecking design decisions and assumptions against source code may outline a robust design, but the implementation may not align with the design intent. 

b. Full Code Pathway Capable — all the possible code pathways can be tested including error handling, resource dependencies, and additional internal code logic/flow. 

c. Early Defect Identification — Analyzing source code and developing tests based on the implementation details enables testers to find programming errors quickly. 

d. Reveal Hidden Code Flaws — access to source code improves understanding and uncovering unintended hidden behavior of program modules.

Disadvantages

a. Difficult To Scale — requires intimate knowledge of target system, testing tools and coding languages, and modeling. It suffers for scalability of skilled and expert testers. 

b. Difficult to Maintain — requires specialized tools such as source code analyzers, debuggers, and fault injectors. 

c. Cultural Stress — the demarcation between developer and testers starts to blur which may become a cultural stress.

d. Highly Intrusive — requires code modification has been done using interactive debuggers, or by actually changing the source code. This may be adequate for small programs; however, it does not scale well to larger applications. Not useful for networked or distributed systems. 


Difference between Black Box and White Box Testing

1. Synonyms for black-box include: behavioral, functional, opaque-box, and closed-box. 

2. Synonyms for white-box include: structural, glass-box and clear-box.

3. Generally black box testing will begin early in the software development i.e. in requirement gathering phase itself. But for white box testing approach one has to wait for the designing has to complete.

4. We can use black testing strategy almost any size either it may be small or large. But white box testing will be effective only for small lines of codes or piece of codes.

5. In white box testing we can not test Performance of the application. But in Black box testing we can do it.



Gray Box Testing refers to the technique of testing a system with limited knowledge of the internals of the system. Gray Box testers have access to detailed design documents with information beyond requirement documents. Gray Box tests are generated based on information such as state-based models or architecture diagrams of the target system.

Advantages

a. Offers Combined Benefits — Leverage strengths of both Black Box and White Box testing wherever possible. 

b. Non Intrusive — Gray Box does not rely on access to source code or binaries. Instead, based on interface definition, functional specifications, and application architecture. 

c. Intelligent Test Authoring — Based on the limited information available, a Gray Box tester can author intelligent test scenarios, especially around data type handling, communication protocols and exception handling. 

d. Unbiased Testing — The demarcation between testers and developer is still maintained. The handoff is only around interface definitions and documentation without access to source code or binaries. 

Disadvantages

a. Partial Code Coverage — Since the source code or binaries are not available, the ability to traverse code paths is still limited by the tests deduced through available information. The coverage depends on the tester authoring skills. 

b. Defect Identification — Inherent to distributed application is the difficulty associated in defect identification. Gray Box testing is still at the mercy of how well systems throw exceptions and how well are these exceptions propagated with a distributed Web Services environment.



1,216 comments:

«Oldest   ‹Older   1201 – 1216 of 1216
Saran said...

very interesting topic.Helps to gain knowledge about lot of information. Thanks for posting information in this blog.
MATLAB Training in Chennai | MATLAB Training in Velcherry | MATLAB Training in Taramani

sindhu sree said...

Wonderful article.It is to define the concepts very well.Clearly explain the information.It has more valuable information for

encourage me to achieve my career goal.

Best Android Training institute in kanchipuram

sindhu sree said...

Wonderful article.It is to define the concepts very well.Clearly explain the information.It has more valuable information for

encourage me to achieve my career goal.

Best Android Training institute in kanchipuram

riya said...

This Blog is very Nice and very useful to us...


Tally ERP9 Course in Chennai | Tally ERP9 Course in velachery | Tally Training in Keelkattalai | Tally Training in Perungudi

ajithrock said...

Thanks its Great Article... I love to read your articles because your writing style is too good, its is very very helpful for all of us.
PHP and MYSQL Training Course in Chennai | PHP and MYSQL Training Course in Velcherry | PHP and MYSQL Training Course in OMR

Saran said...

Very informative blog. Thanks for sharing such good information and keep on updating.This is a nice post in an interesting line of content.Thanks for sharing this article.
VLSI Training in Chennai | VLSI Training in Velcherry | VLSI Training in OMR

seelan said...

Thank you for your information. I have got some important suggestions from it. Keep on sharing.

Best CCNA Training Institute in Chennai |Best CCNA Training Institute in Pallavaram


reshmario said...

It's very great post...Thanks for sharing such an informative post..
Thanks for sharing this valuable information.. I saw your website and get more details..Nice work...
HP and QTP Training Course in Chennai | HP and QTP Training Course in Velcherry | HP and QTP Training Course in Pallavaram

sasitamil said...

I really like your blog. You make it interesting to read and entertaining at the same time. I cant wait to read more from you.

Selenium Training in Electronic City

vijay said...


Very Informative...Glad to find your blog...Keep Sharing...

Java Script Course in Chennai | Java Script Course in Medavakkam


vijay said...


Very Informative...Glad to find your blog...Keep Sharing...

Java Script Course in Chennai | Java Script Course in Medavakkam


Ishu Sathya said...

such an informative blog with huge ideas. Thanks for sharing.

selenium training in anna nagar
selenium training in velachery
selenium training in tambaram
selenium training in omr
selenium training in t nagar

Digitalsenthil said...

Excellent content information. Nice blog content...
Automation Testing Training in Marathahalli
Selenium Training in Bangalore
Best Selenium Training Institute in Bangalore
Automation Testing Training in Bangalore

Digitalsenthil said...

Good post and its very informative too. Thanks for sharing...
Selenium Automation Training in Bangalore
Automation Testing Training in Bangalore
Java Selenium Training in Bangalore
Best Selenium Automation Training in Bangalore
Cucumber Training in Bangalore
Cucumber Training in Marathahalli

Varshini said...

Nice post. This is useful information. This is always happy to know about Salesforce training in Gurgaon whose certification program helps many to get certificed. I strongly urge you to join now in Salesforce Training in Hyderabad | Course Price | Training institute and enroll for free demo at Salesforce Training in Bangalore | Course Certification Cost and Job Placement Assistance . I have gone through this Salesforce Certification Training. Why done you enroll for a free demo at Salesforce training institutes in Chennai [updated] | Course Price

Saravanan said...

Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
CCNA Training Institute in Chennai | CCNA Training Institute in Velachery

«Oldest ‹Older   1201 – 1216 of 1216   Newer› Newest»