Inspectopedia
 
2024.3

Message missing on assertion

Warning
New
Last modified: 03 December 2024

Reports calls to assertXXX() or fail() without an error message string argument. An error message on assertion failure may help clarify the test case's intent.

Example:

After the quick-fix is applied:

assertTrue(checkValid(), "|");

The message argument is added before or after the existing arguments according to the assertions framework that you use.