In
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
and
engineering
Engineering is the practice of using natural science, mathematics, and the engineering design process to Problem solving#Engineering, solve problems within technology, increase efficiency and productivity, and improve Systems engineering, s ...
, a test vector is a set of inputs provided to a system in order to test that system. In
software development
Software development is the process of designing and Implementation, implementing a software solution to Computer user satisfaction, satisfy a User (computing), user. The process is more encompassing than Computer programming, programming, wri ...
, test vectors are a methodology of
software testing
Software testing is the act of checking whether software satisfies expectations.
Software testing can provide objective, independent information about the Quality (business), quality of software and the risk of its failure to a User (computin ...
and
software verification and validation
In software project management, software testing, and software engineering, verification and validation is the process of checking that a software engineer system meets specifications and requirements so that it fulfills its intended purpose. It m ...
.
Rationale
In computer science and engineering, a system acts as a
computable function
Computable functions are the basic objects of study in computability theory. Informally, a function is ''computable'' if there is an algorithm that computes the value of the function for every value of its argument. Because of the lack of a precis ...
. 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 function
Computable functions are the basic objects of study in computability theory. Informally, a function is ''computable'' if there is an algorithm that computes the value of the function for every value of its argument. Because of the lack of a precis ...
s, and
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
A user is a person who uses a computer or Computer network, network Service (systems architecture), service.
A user often has a user account and is identified to the system by a username (or user name).
Some software products provide serv ...
field and a
password
A password, sometimes called a passcode, is secret data, typically a string of characters, usually used to confirm a user's identity. Traditionally, passwords were expected to be memorized, but the large number of password-protected services t ...
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
Vector most often refers to:
* Euclidean vector, a quantity with a magnitude and a direction
* Disease vector, an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematics a ...
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.,