What is assertion testing?
Explain assertion testing.
What are its benefits and limitations?
An assertion is a boolean expression at a specific point in a program which will be true unless there is a bug in the program. A test assertion is defined as an expression, which encapsulates some testable logic specified about a target under test.
It is used to detect subtle errors which might go unnoticed.
It is used to detect errors sooner after they occur.
Make a statement about the effects of the code that is guaranteed to be true.
A test assertion is a statement that describes the logic if the system under test.The biggest plus of assertions is that they are used to detect issues of the product under test.
- The possibility to discover bugs that can be missed.
- The opportunity to find issues as soon as they appear.
- The possibility to make conclusions about the code work that should be proper.
But despite these advantages,the assertions may contain errors too.If during web testing or mobile testing there will be bugs in the assertion,then it will lead to certain difficulties and troubles.
Limitations of Assertion:
- The procedure of error reporting will be failed.
- The tester may report the issue that actually does not occur.
- The improper assertion may cause some side effects.
- The time spent for checking will bring no results.