Error Messages

The framework catches exceptions thrown by the application under test and the fixture that tests it. Application exceptions can be as varied as applications are themselves. Fixture exceptions also vary but some particular exceptions are common when a test and/or its fixtures are being developed. This page lists fixturing error messages that might be reported and their possible causes.

Exceptions are reported in or near the cell that caused it and the cell is cast yellow. The exception message is the first line after a horizontal rule. This will be followed by a traceback of program statements that lead to the error.

Fit does not try hard to diagnose exceptions it encounters, rather it attemps to report what it finds in a straight forward way and move on. Here is that thought expressed more carefully:

  • Fit should protect itself so that it can continue operating in the presence of incomplete or wrong programs, and produce output that leads, with experience, toward continued productive development by the whole team working together.

The following is a partial list of exceptions found in the Java implementation along with some debugging tips. Exception name in java are often qualified with package names like java.lang. These have been omitted in the following list for brevity.

  • NumberFormatException: aString -- aString (which appears in the table) is not correctly formatted as a number. Look a few lines down in the traceback to see what kind of number was expected. For example, if you see parseDouble then aString was expected to be formatted as a double.

  • Exception: can't yet parse aClass -- The code to convert a string to aClass has not yet been written. Either the framework or a fixture will have to be extended, or a fixture will have to be modified to not expect data to be of type: aClass.

  • ClassNotFoundException: aName -- aName (which appears in the table) is misspelt, incorrectly capitalized, not yet written or improperly configured (classpath?).

  • NoSuchMethodException -- A name in this cell, or the one to the right is misspelt, incorrectly capitalized or not yet written.

  • NullPointerException -- Data within the framework was unexpectedly found to be missing (null). This is most often caused by earlier exceptions. Look there for insight. Malformed tables can cause this too. Do you have all the columns expected?


Last edited February 27, 2005
Return to WelcomeVisitors