This project is read-only.

Unit Testing for Modules?

Topics: Writing modules
Sep 26, 2011 at 4:38 PM

I have done some development recently and one of the features I enjoy about the framework is that it forces you to write tests for your code. The framework enforces code coverages for your code (I think at least 70%) and it actually executes the tests and won't let the code move to production until your tests pass.

Does Orchard have (or plan to have) a development feature like this? If so, where can I find info on how to implement this?

If not, any suggestions on how to setup unit testing for automated regression testing of existing and new features in Orchard modules?

Thank you!

 - Matt

Sep 26, 2011 at 11:53 PM

There is nothing that forces you to develop this way but it's certainly encouraged. Please look at the existing test projects in the source release.

Sep 30, 2011 at 3:02 PM

Thank you. So I noticed that some modules include the tests in the module package and some do not. Any reason to do one or the other?

Sep 30, 2011 at 7:00 PM

Whatever's most convenient I suppose. Preferences vary.