Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Behavior Driven Development: suggested tools for perl?

by blogical (Pilgrim)
on Mar 14, 2009 at 07:55 UTC ( [id://750589]=note: print w/replies, xml ) Need Help??


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

"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.

Replies are listed 'Best First'.
Re^5: Behavior Driven Development: suggested tools for perl?
by chromatic (Archbishop) on Mar 14, 2009 at 10:37 UTC
    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).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://750589]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found