先看定义吧:Suppose that an application asks a user for two pieces of information – a
name and a password –to create an account. The user enters the two fields of
data and then saves. Finally, a confirmation window retrieves the new record
from the database and displays the name and password. To validate that all the
data was saved correctly, a Quality Assurance tester simply needs to check the
name and password on the confirmation window. Or do they? Suppose that the
database record holds a third piece of information – Creation Date – which
doesn’t appear on the confirmation window and is only used for archiving. If
Creation Date isn’t saved correctly and the Quality Assurance tester only
validated the onscreen data, then this problem might not be discovered. The
Creation Date could have a defect that causes a user account to become archived
on the wrong date, and yet the problem could go unnoticed
because it is hidden from the user
interface. This example is simplistic, but it demonstrates the point: it is
important that hidden data fields are tested.
Applications have two types of
data: the kind that are made visible to the user, and the kind that are hidden
from them. Defects in the visible data are easy for Quality Assurance testers
to detect, because the problems can be seen directly through the user interface
(UI). Hidden data defects are more difficult to detect because they don’t
appear in the UI, only in the database -- where Quality Assurance testers might
not be aware of them. The testers would need to check the database directly,
without
using the application. If the
Quality Assurance team is testing the application as a ‘black box’ – from the user’s
point-of-view without knowledge of the programming or components behind it –
then hidden data would not be tested at all.
这是援引的《Testing the Hidden Data》这篇论文中的What is Hidden Data?这段内容,其实也就是通过案例来介绍Hidden Data的定义:加入页面需要输入“姓名”和“密码”两个字段来构造一个用户信息,当在保存数据库时,表中同时记录了第三个字段“生成时间”,此时,这个生成时间就是Hidden Data。在本案例中,如果不对”Creation Date”这个Hidden Data进行测试,可能就会遗留下隐患:比如在后续的审计归并中,想搜索某一时间段内的注册用户,由于Creation Date这个字段记录的是错误的,那么这样的统计必然不准确等等。