About   Forum   Wiki   Home  

       
    Managed Chaos      
   
Naresh Jain’s Weblog on Object thinking, Patterns, Open Source, Agile and Adventure Sports

 
`
 
Tags
Recent Comments
Quick Search
Recent Entries
Categories
Archives
April 2006
M T W T F S S
« Mar   May »
 12
3456789
10111213141516
17181920212223
24252627282930
Add to Technorati Favorites

Syndicate This Blog
Entries (RSS)
Comments (RSS)

Archive for April, 2006

James Shore AT Agile Philly User Group Meeting

Monday, April 24th, 2006

I‘m organizing the next Agile Philly User Group Meeting.

Details:

Date & Time: 26th April 2006 6:30 PM onwards

Venue: Siemens Medical Solutions USA, Inc.
Corp III building
51 Valley Stream Parkway
Malvern, PA 19355 1406
Tel +1 610 448 4500
Fax +1 610 448 2554

Agenda:
1. 6:30 – 7:00 : Welcome, food and Intro
2. 7:00 – 8:30 : James Shore will be conducting an activity called “The Tortoise and the Hare.” It is about using tools to speed up agile planning.
3. 8:30 onwards – Discussion

If you are interested in attending, please send me your details [Name and organization]. So that I can leave the list at the security desk. Also will need this for planning food.

We are planning to cap the number of attendees to 30. So please let me know ASAP.

Patang now supports Fit and FitNesse

Saturday, April 15th, 2006

Recently I released the beta 0.2 version on Patang. In this release I added support to run plain Fit tests inside the container [web container]. So now, you can run your fit tests inside the container. It does not matter if you are using plain Fit or FitNesse.

Setup for Fit:
1. Add the fit.FitServlet definition to the deployment descriptor of your web container [web.xml]. An example is available under the docs/web.xml in the release file.

2. Add the absolute path to the directory containing fit tests and the results directory as init-params to the servlet.

3. Deploy the patang-fit.jar file to you web app by putting patang-fit.jar and fit.jar under the WEB-INF/lib folder.

4. If you plan to call your fit tests during your continuous integration build, use the fit.ServletInvoker class, which communicates with the fit.FitServlet in the web container. This servlet can be used to run your fit tests inside the container directly from the web browser or from the ant build file. An example of this is available under the docs/build.xml in the release file.

More details:
http://sourceforge.net/projects/patang

Fit as a replacement for JUnitEE and Cactus (in container testing frameworks)?

Friday, April 14th, 2006

My current project is a J2EE project which uses JDOs for persistence. Off late there has been a huge emphasis on running our unit and unit integration tests inside the app container. With lack of IoC and DI, the code does behave different inside the container and outside the container. Given this as the reality of the world which we cannot change, how do we test drive our code?

So we started of by using JUnitEE for running unit tests inside the container and FitNesse for acceptance tests at the service level. FitNesse does not run inside the container. Hence remote debugging, EJB refs and other container provided facilities could not be used. So I started a new open source project called Patang which gives you the infrastructure to run Fit/FitNesse inside the container through a FitServlet.

Now we had JUnitEE tests testing individual layers of our services, while FitNesse test doing more of what we call end to end service test. We found the following problems with this approach:
1. There seemed like a lot of duplication of test coverage and test data in these 2 types of tests.
2. JUnitEE is as bad as FitNesse tests in terms of quick feedback. In both the cases we need to redeploy our code to the container to test it.
3. Any refactoring meant changes in 2 places. So maintaining the tests became a costly affair.

Because of these problems, we started just writing fit tests and driving our development using FitNesse tests. It seems to be working fine so far.

I feel this approach gives us the following advantages:
1. Fit is pretty good to express the intent. It helps to clearly express what needs to be done. What are the inputs and what are the outputs.
2. It is very good in separating setup data from the actual test itself. So it‘s much easier to understand.
3. We are using just one tool for in container testing and hence decrease learning curve for new team members.
4. Much less test maintenances. It‘s all in one place.
5. Our tests cater to a broader audience. It‘s no more just a developer tool. Our testers can take these fit tests and enhance them with different scenarios. This helps them to keep pace with development. And sometimes drive development to some extent.
6. xJunit is not very good at setting the context and providing explanation to the tests. With Fit we can make our tests more like stories and hence bring them closer to our acceptance tests.

Side effects of this approach:
1. It is much harder to refactor your code, because now you have the fit test and its associated fit fixture. When we rename a method/class or change a method signature, the fit fixture gets refactored by the IDE. But the fit test can be difficult to refactor. It can be even more difficult to maintain them if the test pages are not inside the project structure.
2. The feedback cycle is longer. But same as any in container testing framework.
3. Writing and maintaining the fit pages is a very difficult task. It can get very cryptic. There is no decent IDE to do this. [May be my next open source project]

Some myths associated with this approach:
1. We are moving tests away from the code. I don‘t think so. The fixtures are still organized in the same way we organize our tests.
2. More maintenance. Much better than applying changes in 3 different places. [JUnitEE and then acceptance tests]
3. No IDE support. One can easily use the FitRunner class to run fit tests from the IDE.
4. Cannot be made a part of the build process. Patang project provides you with a ServletInvoker class which can run all your fit tests inside the container and publish the results.

This seems to be working fine for us so far. In the end that‘s what it boils down to.

CIT Conf

Tuesday, April 11th, 2006

Last weekend I was in Chicago attending the Continuous Integration and Testing Conference CITConf. http://citconf.com

This was one of the best conferences I have ever been to. The conference used the OpenSpaces format to structure conversations and help us brainstorm about certain CI and Testing issues.

Some highlights of the conference are:

  • I found the format was very good. Very interactive.
  • Size of the conference was perfect. [Less than 70 people]
  • Good balance of people attending it.
  • Great platform to exchange ideas.
  • Great platform to meet people.
  • Very professionally organized.
  • Free food and drinks.

There were some really good discussions I had with people. It also gave me the opportunity to meet some of the folks I have been talking to for ages.

Influenced by this conference, I‘m planning to organize a similar conference on Simple Design and Testing in the Philadelphia area. I‘m planning to call it SDTConf 2006.

Please drop me a note if you are interested in helping me.

    Licensed under
Creative Commons License
Design by vikivix