Test attribute to watch a file/folder for changes
Scenario: I have long running test (~30s) that uses EF Migrations to check if there are pending changes in data model (no db interaction). Since this is resource intensive I would like this test only to execute if
it is outdated with respect to a folder/file name match in an attribute for it.
Example of usage
[Test]
[FileWatcher("test/contexts/models/*")]
public void MigrationsAreUpToDate() {
//... only treat as impacted if test was last executed before modification date of any files in <slnDir>/test/contexts/models
}
(Related to the old no longer working feature of being able to find impacted tests via consumed resource files, see https://forum.ncrunch.net/yaf_postst2623_Problem-with-impacted-test-for--Track-File-Dependencies.aspx )