Description
Hello,
I can't find any particular rhyme or reason to the layout of the test resources. Each time I make a PR, I waste some amount of time trying to find a viable resource to use, and failing that, trying to figure out where to put a new test resource. There's something of a division into "noclasspath" test resources, and everything else, but plenty of other resources are actually used in noclasspath tests. Every other test class also seems to have its own getResource
-esque method.
This problem hinders me in submitting pull requests, and especially so when I just want to quickly highlight some specific bug I've found. I think this also applies to other potential contributors, especially end users who just want to reproduce an issue they've found. As more tests and resources are added, the problem will just grow.
I suggest we decide on a clear scheme for how to place resources in relation to tests, and define a helper class with the sole purpose of fetching resource paths. All future tests would have to adopt this new scheme, and we can gradually migrate the older tests to it.
It may be helpful to also have a high-level buildModelFromResources
method, to which one just passes filepaths and get a model back. There are tons of tests that repeat the small amount of boilerplate required to create a launcher, add a resource to it, and build the model.
Any thoughts on this? It may be that I'm just too much a stickler for rules, but I really find the lack of direction in placing and using test resources to be an unnecessary distraction from actually writing a test case.