After I finished reading Open Source Programming and all the of the feedback from my Mock Shmocks post, I've realized that I need to learn more about Mocks. I need to learn how to streamline my TDD process. It's just taking too long right now. So where do I go from here? AppFuse currently contains, from what I can tell, only integration tests. All the tests depend on the database or the container to run. It works great, and all of AppFuse's tests complete under 3 minutes, but obviously this time increases as the project grows. So should I remove some integration tests and replace them with unit (mock) tests? If so, which ones? Should UserDAOTest talk to the database, but LookupDAOTest only use a Mock? How do you decide which tests should be real (integration) and which tests don't need to be (mocks)?
If the answer is "create a unit tests to sit next to each one of your integration tests" - then that seems like a waste of time. Am I supposed to have 2 *Test.java classes for each real class? I need a book that'll explain all of this and make me the TDD guru I long to be.
Even if I figured out all the answers to the above questions - which package should I use? There's a whole slew of them: Mockrunner, MockObjects, EasyMock and jMock. How do you decide? It's easy when testing Java classes - you use JUnit. When you want to test servlets, you use Cactus. Why all the choices for Mock testing?
I've been watching the Tapestry mailing lists in hopes of picking up some tips before I start learning it. In reality, I'm waiting for Tapestry in Action, which will hopefully make it easier to learn. Today, there was a very interesting thread comparing Tapestry to Struts. It looks to me that Tapestry is easier to develop with once you get the hang of it, but apparently, it has a steep learning curve.
The Tapestry Mailing list is interesting - it seems to have a different level of users. Maybe it's just me, but they seem to be a more enlightened crowd. You could almost say the same for the WebWork mailing lists. If I compare these two lists to the questions on the Struts mailing lists - it seems like there's a bunch of idiots over there (on Struts). Don't these people know how to use Google?! To be fair to Struts, I have a theory.
If WebWork or Tapestry ever becomes as popular as Struts, they'll get their fare share of idiots too.
It's just the nature of mailing lists - it's so much easier to ask your question than to look for the answer. Which reminds me...
Most of you won't care about this, but I need to write it down so I know the day that Daisy died.
Today was one of the first days we had a to make a real sacrifice as parents. Daisy was a cat that Julie had when I first met her. When Julie got Daisy, she was so small she could fit in the palm of her hand. Daisy was weaned too early from her mother (who was killed by a snake), so she had a personality disorder. Basically, she was mean and hated other cats. Daisy hated all the guys that Julie had ever dated (in college), until she met me. Julie knew it was special when she saw Daisy didn't hate me. Daisy traveled with us from Florida to Colorado when Julie moved here. She lived with us in our one-bedroom apartment, moved with us to our first house, and was a great cat for Abbie's first year.
Even though Daisy was mean, she was also the nicest cat I'd ever met. She'd always cuddle up on my lap when I watched TV or when I was working on the computer. You just had to watch out when you walked - she was an ankle biter. For the last year, she's been a pretty good cat with Abbie - just sitting there when Abbie poked and prodded. However, in the last month, she's started to fight back and has bitten and scratched Abbie quite a few times. My take on it was "good - Abbie should learn not to mess with the cat." Besides, Abbie wasn't crying - so it couldn't hurt too bad. Julie had a different take on it - especially since the folks at day care asked where the scratches came from.
When I got home tonight, Julie was in bed with Abbie at 7:00. "7:00!?" I thought, "that's a bit early." Then Julie told me "today was a very bad day" and she proceeded to tell me that they took Daisy in to the pound. Damn - my favorite cat. Ever. Gone. They got a new one, but it won't be ready until tomorrow. I want Daisy back, she was the bomb.