I come from a Python background, so I'm used to pretty automatic test discovery. For example, the
py.test library automatically locates any files which begin with
test, finds classes whose names start with
Test inside of the those files, and then calls all the functions whose names start with
test_ in those classes.
This type of test discovery is enabled by Python's deep support for reflection and dynamism.
These features are often absent in statically typed languages, because they're difficult to make integrate with the type system.
Therefore, I'm interested in hearing about what approaches statically typed languages use to make test discovery simpler?