in reply to Re^2: Behavior Driven Development: suggested tools for perl?
in thread Behavior Driven Development: suggested tools for perl?

I think the only thing I've ever written about BDD specifically is that it's, like many projects in the Ruby world, a copy of something well established and well understood almost everywhere else with much worse syntax, a pretentious name, and a hipper-than-thou following.

(tongue very slightly in cheek)

  • Comment on Re^3: Behavior Driven Development: suggested tools for perl?

Replies are listed 'Best First'.
Re^4: Behavior Driven Development: suggested tools for perl?
by blogical (Pilgrim) on Mar 14, 2009 at 07:55 UTC

    "What have my tests been testing for the past decade, sparkly pink unicorn content?" Hilarious. Also, focused on one implementation of behavior driven design (RSpec) and not the concept itself, so maybe there is more to be said.

    In reading what seem to be the most prominent articles on the subject I did not notice Ruby mentioned to any greater extent than Java, .Net, PHP or Python. But none mention Perl, and that's why I'm asking.

    My (very positive) experience with testing in Perl, largely using Test::More, has encouraged me to adopt testing as key to development. BDD says that testing (disregarding semantic affections) should also be key to design. In particular, it seems that certain types of tools are useful to do the design, such as mock objects. I didn't mention Test::MockObject in my initial post, but I certainly expected that someone would. I'm... rather surprised that you didn't.

    What I seek are perl idioms for from-scratch application design, in perl, that implement acceptance test cases. I can find that for other languages. What I have seen of testing in perl focuses on unit/regression testing of discrete functions. I have read much of, and appreciate greatly, what you have already contributed to that conversation. I would happily take in any thoughts you have on developing top-down in perl.

      BDD says that testing (disregarding semantic affections) should also be key to design.

      So does TDD. It's a design activity. That's why the final step (before "repeat") in TDD is "refactor".

      What I seek are perl idioms for from-scratch application design, in perl, that implement acceptance test cases.

      I'm afraid I don't appreciate the difference between using existing Perl automated testing modules and techniques and idioms to write acceptance tests versus unit tests. The scope of the test and what it tests varies, but the automation and libraries and harnesses and runners and emitters don't.

      The real question is "How can I express a necessary condition of the software in the terms most naturally applicable to the problem domain, not coupled to any particular low-level design of the implementation?" I believe that FIT is one approach worth your time. It's not perfect, but it's a very good way to start to consider the problem. You can, of course, do the same thing with Test::More and its ilk (though if you find yourself needing to create many mock objects to make it work, I may start to suspect you've gone into the weeds).