⇓ Get Latest Updates ⇓

Enter your email address:

Check email in your inbox for confirmation to get latest updates Software Testing for free.

⇓ Categories ⇓

Netsparker Web Application Security Scanner

Gray Box Testing

What is Gray Box Testing?

Gray box testing is the testing of software application using effective combination of both White box testing & Black box testing method. This is nice & powerful idea to test the application.

The white box testing means tester is aware of internal structure of code but the black box tester doesn’t aware the internal structure of code.

In the Gray box testing tester is usually has knowledge of limited access of code and based on this knowledge the test cases are designed and the software application under test treat as a black box & tester test the application from outside. Don’t confuse with White box & Gray box, as in the Gray box testing is tester doesn’t have the knowledge in detailed. Also the Gray box testing is not a black box testing method because the tester knows some part of the internal structure of code. So Gray Box Testing approach is the testing approach used when some knowledge of internal structure but not in detailed.

The name is comes because the application for tester is like a gray box like a transparent box and tester see inside it but not fully transparent & can see partially in it. As tester doesn’t require the access to code the gray box testing is known as unbiased & non-intrusive.

To test the Web Services application usually the Gray box testing is used.

Gray Box Testing Example:

We will take example of web application testing. To explore gray testing will take a simple functionality of web application. You just generic provigil for sale want to enter email id as input in the web form & upon submitting the valid email id user & based on users interest (fields entered) user should get some articles over email. The validation of email is using Java Script on client side only. In this case if tester doesn’t knows the internal structure of the implementations then you might test the web application of form with some cases like Valid Email Id, Invalid Email ID & based on this will check whether functionality is working or not.

But tester is aware of some internal structure & if system is making the assumptions like

  • System will not get Invalid email ID
  • System will not send email to invalid email ID
  • System will not receive failure email notifications.

In this type of testing you have to test the application by disabling the Java Script, it might be possible due to any reason Java Script is failed & System get Invalid email to process & all assumptions made by system will failed, as a result incorrect inputs are send to system, so

  • System will get Invalid email ID to process
  • System will send email to invalid email ID
  • System will receive failure email notifications.

Note: The Gray box Testing is also spell as “Grey Box Testing” so both GrayBox Testing & GreyBox Testing are the same one.

We think that you will get a clear idea of Gray box testing. If you have an example, experience on tips on gray box testing? then you can share it in comments the section below.

13 comments to Gray Box Testing

  • Pooja

    Damn good, cleared the concept of Grey box testing & really helpful information to me, thanks

  • Syed Abid

    Clear explanation about Gray box testing, Good job.

  • siva

    Thanks a lot for sharing all this information. please keep on updating the article so that we can get more and more knowledge in terms of website testing…. please share about selenium IDE like how to use..? and how to generate test scripts…?

    Again Thanks

  • srinidhi k

    Good One. We can also implement more techniques such as mentioned into above block by thinking differently.

  • Greg

    Good one. Explaining with example is great.

  • Siva

    Good one. Its great to explain with example.

  • alex

    Good One. We can also implement more techniques such as mentioned into above block by thinking differently

  • sathyan

    Gud aft Friends,which book is easily understand for test cases pls tell the book name and authour by sathyan.

  • suyash

    i was having some different idea of this GB Testing .
    can you tell me below is right ?

    GB = WB+BB = some knowledge of internal code working + functionality to be check according to SRS.

    SO in GB we just do not make TCs based on valid / invalid inputs but also make TCs depending on the Conditional (if else, case) and Looping statements (for , while) also.

    so i don’t have actual coding on my bench but i know algorithm of the with conditional and braching as Flowchart or other means

    Example :
    Registering a NEW User

    1. Check The User ID exist in database ?
    if yes give error or msg as required
    2. if User ID is Unique , check Mail ID entered by used exist in Database , is yes again error or MSG.

    thus after 1st If condition of “User ID” is passed check for next If conditions and so on

    Is above logic correct ????

  • Tareq

    Good Explanation regarding “Gray Box Testing”



  • omran

    good Explanation

    can i know the writer name plz?

  • Alok

    The white box testing means tester is aware of internal structure of code but the black box tester doesn’t aware the internal structure of code.

    I think it is wrong.?

  • Pradeep Kumar

    Thanks, It is very helpful for me.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>