Daily Usage Issues

File Change Dependancy

Started by randomsolutions on 5,691 views

Hello, I was wondering if there was a way to tell ncrunch to re-run a test when a file changes.

For instance, say I have a .sql file and a simple test that just executes that sql file to see if it throws an exception or not. I'd like to have ncrunch automatically run the test whenever I save the sql file.

Hope that makes sense.

Thanks for an amazing product!
Hi, thanks for posting!

NCrunch will automatically track changes to any file included in any of your projects.

If you include the .sql file in a project being watched by NCrunch (for example, in the .proj XML), it will automatically detect when you make changes to the file in the IDE and will re-run tests. If the file is opened outside the IDE, NCrunch will detect when it has been changed on the file system and will re-run tests.

You may also wish to have a look at the Additional files to include configuration setting, which gives you another way to include files to be watched by NCrunch. Depending upon your needs, you may find this more convenient than changing a project file.


Cheers,

Remco

Post a reply

Log in to reply.