This project is read-only.

Of Specs and Men

Topics: Core, Customizing Orchard
May 4, 2015 at 2:50 PM
Hello there,

Here is a question that'll require some reflection - and no, not of the technical variety - on part of the people who are actively involved with the project.

Orchard has a "specs" project that describe the behaviour of some parts of the system, which can be executed and verified a la automated unit tests. Unlike unit tests, however, specs give, almost in a natural English, a high level description of the code under test: a single spec might span multiple modules, let alone classes, even if it tests for a singlular outcome. This idea will be quite familiar to those who practice some form of behaviour or test driven development.

Now, my question is this: to what extent have specs been useful? Were they worth the investment? I'm curious because I have been working with a small team in developing a rather large and complicated module for Orchard, and we have been considering writing our own specs. None of us have any real experience with test automation (or specflow) so it is quite difficult for us to gauge whether it'll be worth it in the end.

I'm also quite curious to hear opinions whether it's considered worth it to write executable specs before development has taken place (specs being the result of analysis), or whether to wait until the implementation is actually finished, so that an implementation is already in place.

If you take the time to respond to this, please accept my thanks in advance.
May 5, 2015 at 9:06 PM
Interesting question. As those tests were written a very, very long time ago (and I think afterwards only maintained but never expanded) I'd be interested in this too.
May 5, 2015 at 9:15 PM
This kind of test works well for functional testing. They are somewhat easier to read and write for that category of test. It's also a matter of taste. I don't especially like that they are called "specs" however. That may be the intent, but it's rarely what they actually are in the end. They are tests.