Feature Suggestions

Association of non-code (and other undetected dependency) files with tests

Started by jeremygray on 6,112 views

It would be very useful if one could associate with a given test (or fixture or what have you) one or more files (perhaps via a test or fixture attribute including the dependency's relative path or somesuch) for use when NCrunch cannot be expected to detect the dependency between test and file. The modification of such a file could then trigger the associated test(s), particularly when running in incremental mode but I suppose also for use in prioritization when in the normal automatic mode.

As but one example, this would be especially handy for use with tests where an external file holds the expected results of a test, where I would like to start a given TDD cycle by making a modification to the external file, watch the test go red, modify the code to produce the newly-desired results, and finally watch the test go green, all without pinning tests and running them manually.

Edited

Thanks for the suggestion. I do have plans here, though these were more of the automated variety (i.e. profiling a test to identify its file dependencies). Right now, as long as NCrunch is aware of a file dependency, it will always rerun tests whenever the file is changed.. However, it doesn't know enough about the association to be able to perform smart prioritisation - so definitely there is work to be done here.

Post a reply

Log in to reply.