In this article we will look through the notion of validation and get to know how to test validation.
First thing first, let’s make it clear with the notion of validation in the IT sphere.
In this article we will look through the notion of validation and get to know how to test validation.
First thing first, let’s make it clear with the notion of validation in the IT sphere.
To cut a long story short, validation is the process of checking the data in accordance with the early approved standards, requirements or rules. For instance: the birthday date field accepts only full positive numbers (including zero) and cannot be more than 31 (as this is the maximum amount of days in a month). Another common mistake is that people often confuse validation and verification.
Verification is the confirmation that everything was performed according to the standards, requirements and rules.
So, as we defined the notion of the validation, stands the question — is it really needed? The answer is simple — it provides the gathering of the needed and sorted information. Validation also can serve as a security means, because if unknown data is given to the database, it can freeze and restart, show private information or delete everything.
There are three types of validation:
And, of course, there comes a question, which of these is the best one? Indeed the one that allows users to see the information faster, decreasing the time to return and correct the mistake made — and it is an instant validation. However, it is not always possible to provide such a type of validation, so the second most popular is the validation after losing focus. The third type, after sending a request validation, is carried out only in case if the validation after losing focus is not possible.
Also, it is important to mention one important case, when the separate field go through the validation and don’t show mistakes, however, with the combination of those, they will show the results that won’t be acceptable for the system. Let us look at the example of the mobile phone field: you type in the country code (+380) — the validation is successful because such code exists. Next, input the phone number (9611001231) – validation is also successful, but after all the system won’t accept the digits because the phone number of this country can’t exceed 9 digits.
In cases when the validation is not passed, the user receives the visual notification in form:
These are the most common notifications.
So how not to allow the user to send the data that hasn’t been validated? Everything is simple — block or hide the send button or simply not send the data until everything is inputted according to the requirements.
Let us analyze closely, how to properly approach the validation testing. These examples are not the solution for all types of validation, they depict the most common ones.
Let us look at the registration form first.
- input only symbols;
- input only numbers;
- input only Cyrillic letters;
- input only Latin letters;
- register with the inputs above.
The expected result must be the following:
And in the end, it is worth saying that validation testing is a very important point in any interface and you need to understand that sometimes the security of a particular client's data, as well as the security of all data, depends on the correctness of data entry. A specialist in the field of QA needs not only to check validation, but also to understand very clearly at what points the system has a vulnerability (flaw) and what needs to be improved.