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.

==Rationale==

In computer science and engineering, a system acts as a computable function. An example of a specific function could be <math>y = f(x)</math> where <math>y</math> is the output of the system and <math>x</math> 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 <math>y = f(x_1, x_2, ...)</math> ; however, we can generalize this equation to a general form <math>Y = C(X)</math> where <math>Y</math> is the result of the system's execution, <math>C</math> belongs to the set of computable functions, and <math>X</math> is an input vector. While testing the system, various test vectors must be used to examine the system's behavior with differing inputs.

==Example== 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: <math> y = L(u,p) </math>

with <math>y \in \{ true , false \}</math> and <math>u,p \in \{ String \}</math>, with <math>true</math> designating login successful, and <math>false</math> designating login failure, respectively.

Making things more generic, we can suggest that the function <math>L</math> takes input as a 2-dimensional vector and outputs a one-dimensional vector (scalar). This can be written in the following way:-

<math> Y = L(X) </math>

with <math> X = [ x_1, x_2 ]=[u,p] \; ; \; Y = [ y_1 ] </math>

In this case, <math>X</math> is called the input vector, and <math>Y</math> is called the output vector.

In order to test the login page, it is necessary to pass some sample input vectors <math>\{X_1, X_2, X_3, ...\}</math>. In this context <math>X_i</math> is called a test vector.

Alternatively, the concatenation of <math>X</math> and <math>Y</math>, e.g., <math>[ x_1, x_2, y_1 ]</math>, can be called a test vector.

==See also== *Automatic test pattern generation

== References ==

*Test Vector Guidelines. [http://www.actel.com/documents/TestVector_AN.pdf] *Test Vector Considered Harmful. [http://fate.tttc-events.org/proceedings/5.1.pdf]

Category:Computer engineering Category:Test items