Keyboard

↓ ↑
move between the rows you can see
→
open a feature, then step into it
←
close a feature, or step out to the one above
Enter
go to the page in focus
Tab
the same rows, plus everything else on the page
/
search the whole report
m
open or close the navigation drawer
Esc
leave the search box, or close the drawer
?
this list

Names the file when a resource cannot be read

All 3 scenarios hold

A table can live in a classpath resource file instead of the annotation: @TableTest(resource = "external.table", encoding = "UTF-8").

The first three rules below call the loading API with those same arguments. Their tables can therefore show which paths resolve, what text the file's bytes become, and how loading fails.

The rules after them are driven by the very files shown. Each row comes from a line of the file rather than from the annotation.

Loading fails in two ways. The table shows the first way twice, because the search has two halves. A path can resolve to nothing at the classpath root, or inside a folder on it. The second way is a file that resolves while the declared encoding cannot decode it.

Every failure raises the same exception type. The message tells the two ways apart, and each message names the file the rule could not read.

expected outcome broken scenario
ScenarioResource pathEncodingThrows?Error message?
No such file anywhereno_such.tableUTF-8org.tabletest.junit.TableTestExceptionExternal table file no_such.table not found, searched the classpath relative to org.tabletest.junit.features.JavaExternalTableTest and from the root
Subfolder file misspeltsubfolder/xUTF-8org.tabletest.junit.TableTestExceptionExternal table file subfolder/x not found, searched the classpath relative to org.tabletest.junit.features.JavaExternalTableTest and from the root
Encoding does not existexternal.tableLatin-42org.tabletest.junit.TableTestExceptionFailed to read table from external file external.table using encoding Latin-42