Recommended reading on test-driven development?

96 views
Skip to first unread message

Sara Cowles

unread,
Mar 12, 2013, 11:21:46 PM3/12/13
to groo...@googlegroups.com
Hi everyone,

Hope the meetup went well tonight!  

I have a question that I don't see in old posts, although feel free to correct me if I'm wrong: 

Does anyone have written resources they would recommend, focused in particular on test-driven development in grails/groovy?

Thanks,
Sara

Bill Turner

unread,
Mar 15, 2013, 12:16:13 AM3/15/13
to groo...@googlegroups.com
Hi Sara,

Not sure exactly what you are looking for. I presume not a primer on TDD, just rather how to do it groovy. In that regard, I know Venkat's book had some good stuff on testing. I think Ken Kousen has some good stuff in his forthcoming book (available as a MEAP). Likewise, Lasse Koskela's book "Unit Testing" has a chapter covering Groovy, and Groovy DSLs for testing (EasyB and Spock). The Spock website is a pretty good place to learn about Spock.

bill


--
--
You received this message because you are subscribed to the "Groovy Users of Minnesota" group.
 
To post to this group, send email to groo...@googlegroups.com
To unsubscribe from this group, send email to groovymn-u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/groovymn?hl=en
---
You received this message because you are subscribed to the Google Groups "Groovy Users of Minnesota" group.
To unsubscribe from this group and stop receiving emails from it, send an email to groovymn+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Bill Turner
 
GR8 in the US conference - http://gr8conf.us/
Blog : Groovy/Grails Talk - http://www.changent.com
Twitter : bill_turner - http://twitter.com/bill_turner
LinkedIn : wltiii - http://www.linkedin.com/in/wltiii
Phone : +1.612.276.2135

An innovative Software Development Professional, Bill Turner is the co-founder and Principal Organizer for GR8 in the US, a conference on Groovy, Grails, Griffon and related technologies. He has worked in companies from emerging startups to Fortune 500s, and has consulted and lived internationally. The majority of his 30 plus years in the software development industry has been spent as a consultant, with 75% of the business being repeat/referral business. He has collaborated closely with individuals at every level of the organization and has performed a wide variety of roles. He knows software development. He understands business. He helps companies succeed.

glenn opdycke-hansen

unread,
Mar 15, 2013, 11:18:20 AM3/15/13
to groo...@googlegroups.com
Hi!

There is another MEAP for Grails that has information on Spock and TDD.  The document/book is Grails in Action 2nd Edition.
If you read this book, please let me know your comments on it.

-glenn

--glenn

Sara Cowles

unread,
Mar 15, 2013, 1:23:48 PM3/15/13
to groo...@googlegroups.com
Hi Bill, 

This is great, thanks very much!  We'll dig into your suggestions.

Sara

erickinsella

unread,
Mar 15, 2013, 4:03:22 PM3/15/13
to groo...@googlegroups.com
Zan and Colin also put together a really nice cheat sheet a while back for Grails 1.3.7.


I hear an update is coming any day now for an updated 2.x version. OK that might be a rumor I'm starting but it'd be really nice.

- Eric

Sara Cowles

unread,
Mar 15, 2013, 4:18:18 PM3/15/13
to groo...@googlegroups.com
Nice! I hope the rumor proves true. :)  I've passed it along to our engineers.  The Grails in Action MEAP looks great too.

Colin Harrington

unread,
Mar 15, 2013, 5:15:16 PM3/15/13
to groo...@googlegroups.com
+1 for Grails in Action MEAP

Thomas Lin has a good post on testing resources { plugins, videos, books, etc } that I recommend digesting.

Also don't forget the chapter in the Grails User Guide on testing.

"Testing Grails" presentation that Zan and I did a while back: http://zanthrash.com/grailstesting/grails_testing.pdf which includes a link to a repo with some examples.


Ultimately your team will have to gain mastery with the testing tools & concepts that you end up utilizing in order to achieve a successful TDD process.

This will happen by:
  • Practice, practice, practice
  • Reading docs on the tools
  • Finding examples (google it, github examples, etc.)
  • Learning from others with experience

Colin Harrington
colin.ha...@gmail.com

Andrew P. Tasi

unread,
Mar 15, 2013, 6:56:24 PM3/15/13
to groo...@googlegroups.com
Hello Glenn [Opdycke-Hansen, not Glen Smith]

Regarding "Grails in Action", I'm a Grails newbie, I bought the first edition, and also subscribe to the MEAP for the second edition.
- Grails in Action is not meant to be an introduction to programming or web development, and it assumes you have a some basic understanding of both (fine by me).
- The first edition was written for Grails 1.x (and therefore Groovy 1.x).  You could still learn a lot from it, but it's probably best to work through it using Grails 1.x as there are numerous items and examples that don't quite fit or work with Grails 2.x.
- The second edition is being updated for Grails 2.x, but as with any MEAP, it is a work in progress.  Less than 50% of the chapters have been released, and some of the existing text and examples have not yet been updated for 2.x.  http://www.manning.com/gsmith2/
- Both editions are very tightly written and to the point.  The plus side is you learn a LOT very quickly without having to work through 1000 pages.  But... depending on your learning style and level of expertise, you might either love that, or you might find the text a little terse at times.  This is not a "Dummies" book or a "Head First" book, and it doesn't have the repetition and hand holding those series have, nor the explicit "Do this exercise before moving on" messages.  As such, it's best to read carefully and to try to work through most of the examples.
- If you run into a problem while working through either edition, 1) Re-read the last paragraph or two to make sure you didn't miss something, then 2) Check the corresponding Manning forum.  The answer will almost be in one of those two places.

Regards,
Andrew P. Tasi


From: glenn opdycke-hansen <glen...@gmail.com>
To: groo...@googlegroups.com
Sent: Friday, March 15, 2013 10:18 AM
Subject: Re: [GUM] Recommended reading on test-driven development?

Zan Thrash

unread,
Mar 16, 2013, 6:21:36 AM3/16/13
to groo...@googlegroups.com, groo...@googlegroups.com

I heard the rumor that Zan is working on a Spock specific cheetsheet for his Spock talk at Gr8Conf US this year.  


Sent from Mailbox for iPhone

erickinsella

unread,
Mar 18, 2013, 9:09:57 AM3/18/13
to groo...@googlegroups.com
That Zan guy is ok in my book; I am so looking forward to some GR8 sessions this year. I hate myself for typing that. 

-- Eric

Natalya Portnov

unread,
Mar 20, 2013, 5:47:22 PM3/20/13
to groo...@googlegroups.com
Hi All,

Colin, 
   creating custom test suite following: 
       http://ldaley.com/post/615966534/custom-grails-test from your "Testing Grails" presentation:   

the same test (FooControllerTests.groovy) runs with no errors if "assertFalse" commented out in test/custom/com/ngp/FooControllerTests.groovy but if  "assertFalse response.text == ..." uncommented the custom test fails but the same unit test runs with no errors:

1. 
ngp@ngp:~/development/grails/playground/test-custom-type-phase$ grails test-app unit:unit
| Completed 1 unit test, 0 failed in 1128ms

2. assertFalse commented out::
ngp@ngp:~/development/grails/playground/test-custom-type-phase$ grails test-app custom:custom
| Running 1 custom test... 1 of 1

3. assertFalse uncommented::
ngp@ngp:~/development/grails/playground/test-custom-type-phase$ grails test-app custom:custom
| Running 1 custom test... 1 of 1
| Failure:  testIndexRender_CustomTestSuite(com.ngp.FooControllerTests)
|  groovy.lang.MissingMethodException: No signature of method: com.ngp.FooControllerTests.assertFalse() is applicable for argument types: (java.lang.Boolean) values: [false]
at com.ngp.FooControllerTests.testIndexRender_CustomTestSuite(FooControllerTests.groovy:17)
| Completed 1 custom test, 1 failed in 1194ms
| Tests FAILED  - view reports in target/test-reports

Can you please tell me what might be the problem? This is the app if you can take a look when you get a moment:

Thanks,
Natalya
Natalya G. Portnov
IT Professional
University of Minnesota

Health Studies
200 Oak St SE, Suite 350
Minneapolis, MN 55455

T: 612.625.4329
F: 612.624.3370
E: n...@umn.edu
Reply all
Reply to author
Forward
0 new messages