Test vector
In computer science and engineering, a test vector is a set of inputs provided to a system in order to test that system. In software development, test vectors are a methodology of software testing and software verification and validation.
01Rationale
In computer science and engineering, a system acts as a computable function. An example of a specific function could be where
is the output of the system and
is the input; however, most systems' inputs are not one-dimensional. When the inputs are multi-dimensional, we could say that the system takes the form
; however, we can generalize this equation to a general form
where
is the result of the system's execution,
belongs to the set of computable functions, and
is an input vector. While testing the system, various test vectors must be used to examine the system's behavior with differing inputs.
02Example
For example, consider a login page with two input fields: a username field and a password field. In that case, the login system can be described as:
with and
, with
designating login successful, and
designating login failure, respectively.
Making things more generic, we can suggest that the function takes input as a 2-dimensional vector and outputs a one-dimensional vector (scalar).
This can be written in the following way:-
with
In this case, is called the input vector, and
is called the output vector.
In order to test the login page, it is necessary to pass some sample input vectors . In this context
is called a test vector.
Alternatively, the concatenation of and
, e.g.,
, can be called a test vector.
Sources and credits
This article is adapted from the Wikipedia article “Test vector”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.