It is good to dedicate some time, sit back talking and thinking about the best practice in software development. That is what our team did in the last couple of days, I am very appreciate that and I think I got a lot from it.
Our team lead Matt Stine invited Jared Richardson, an author, speaker, consultant, and mentor come to give us a three days class. I was in the class for Thursday and Friday, and also listened to his talk on Thursday night Jug meeting, it was an awesome talk. We talked a lot about testing tools and strategies, spent fair amount of time on Selenium.
Jared’s three testing strategies make a lot of sense. He was not only talked about the goals and also talked about how to get there, what are the difficulties. From the success and non success stories about other software shop, we learned a lot about others and our-self. Jared said “A common problem is every team think they are special or not common”.
Here are the three strategies: TDD (Test Driven Development), don’t write a single line of production code until you have a failed test; DDT (Defect Driven Test), Jared said he actually invented this term, write test code whenever you find a production bug; Blitzkrieg, a military term, here is the full definition.
Defect Driven Testing is really a good place to start. To write test for a bug, DDT make you think the test code is really doing something useful and then you are willing to spend more time on it. We actually did that even though we didn’t know the term at the time. We were using EJB2 and you know to test EJBs is not the easiest thing to do. You need to really realize the important of testing to put those effort writing test code for EJBs. We actually built a home grown testing framework for that and we had pretty good coverage for back-end APIs. It is encourage to hear from professional that what we did was a good practice.
Selenium is a testing tool that we talked a lot these couple of days. We had a lightening talk last night by Chris Roberts and we spent the whole day today to get our hand dirty. Selenium is a very good testing tool for Web Application, can be used for unit, functional and integration testing. It is also a very good tool for demo the Web Application functionality. Selenium’s main modules are: Core, IDE, RC and Grid, new modules may added already, the project evolved very fast. One cool thing we learned from today’s practice is that after record the test case using IDE, you can export it as Java and run as Java test (the Selenium RC need to be started). We also refactored the Java test code to make it more readable so people don’t know Java can read and even write the test. Selenium is sweet, we will definitely use it in our projects.
Everyday we spend on the earth is probably or should be unique, but a lot of people feel like today is just a repeat of yesterday. These couple of days is definitely unique in my developer life.
Posted in Java
Tags: Java, jee. ide, Spring, testing