More and more, testing requires higher-level testers that can not only tell developers ‘this is incorrect or broken’, but also analyze where and why it happened. Gray box testing provides a deeper level of testing that can provide this information so that the developer can pinpoint the defect’s cause more readily. It’s a combination of white and black box testing where the tester partially knows the internal structure of the software and can develop test cases that apply to the inner workings of the software. Different from white box where the internals of the product are tested in detail but not necessarily from an end user viewpoint, gray box approaches the product from the user viewpoint as in black box testing, but with knowledge of how the underlying components operate. In this way, different types of test cases can be written which dig deeper into the software but from the end user point of view.

Gray Box Testing Examples

  1. Queries or searches. A gray box tester with knowledge of the structure of product’s database and SQL expertise, can develop test casesthat mimic use cases used in black box testing, but with more flexibility in developing scenarios. Or if a black box test failed, a gray box can find the error in the database and report the defect with more details.
  2. Error code analysis. For example from a bluescreen or webpage.With an error code table, either developed by the gray box tester or provided by hardware or interface, each code may have a corresponding related cause. For example ‘0x000000a’ for a blue screen means a hardware problem and ‘Internal server error 500’ for webpage typically means a server error. With this information, the gray box tester could then investigate the cause in more detail to determine the source rather than just reporting to the development team.
  3. Analyze and change registry table’s parameters. For example, to verify if a homepage has been changed, regedit can be used to check values under HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain
  4. Examining log files. Most software programs have log files. When examining defects or causes of low performance, checking log files often provides clues for root causes.

These are just some simple samples. As you can see, gray box testing is a broad term, and basically provides a deeper level of testing in-between white and black box testing. As testing becomes more technical and agile testing requires closer cooperation with the development team, gray box testing skills should be in your toolbox.