Answer the question
In order to leave comments, you need to log in
How are tests different from validation?
Why do I need tests? When there is validation, why do we need tests?
Answer the question
In order to leave comments, you need to log in
Validation is an additional feature of the framework that allows you to check whether the dressed data meets your expectations. For example - that the user will enter a password of 8 characters, and not of 3, or that the site address " wwdi.ru " is correct, but "yaya//yvayva,.," is incorrect. Tests, on the other hand, are a tool for checking how your code works correctly, for example, that after login, the user is sent to the dashboard, and with correct registration, a new user appears.
I don't know why you need tests. You can replace them with validation. In our villages, this is not yet possible.
It's hard to say how they differ, it's like asking: what is the difference between blue and soft.
Validation involves checking data with a positive or negative result.
Assertions are similar to validations, but must throw exceptions, unlike validations.
Tests involve checking the business logic of the application.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question