|
November 2004
[
vmassol
]
19:43, Wednesday, 17 November 2004
IntroductionAutomated tests are good. Automated Functional tests are even better as they are the proof that your application is working. In addition, with automated functional tests you can also automate your delivery process. However, writing automated functional tests is hard. The main reason it is hard is because you need to control your execution environment (database, application server, etc). Cargo is a framework that you can use to automatically install, configure and execute J2EE containers. Thus it allows you to control your execution environment (for the J2EE container at least) and permits completely automated functional tests for J2EE applications. ExampleLet's walk through an example. Imagine we wish to start up Tomcat 4.1.31 before such test runs. Here's what we could write:
Step 1 is optional. You can also rely on the container being already installed on the test machine if you wish. However, it's nice to completely automated the testing and assume nothing (or very little - We still need an OS and a JDK on the machine). In this example we're fetching the Tomcat 4.1.31 installation from the web. We could fetch it from our intranet or from a location on the machine or from our SCM. In Step 2, we have not told Cargo what container Configuration to use. Thus Cargo will use a default Configuration and it will configure it so that your container will execute in a temporary directory that it will create in your OS system tmp dir. If you wish to control this you can use:
in step 3, we create a Cargo wrapper around a physical WAR and we add it to our container so that it is deployed when the container starts. We then start the container (step 4), perform any testing we wish (step 5) and ensure the container is always stopped at the end of our test (step 6). If we wish to start and stop the container only once during our whole test suite we can use a standard JUnit TestSetup. ConclusionThis is just a short introduction to Cargo to demonstrate how easy it is to start/stop a container. The API is of course richer. Also, we're showing here how to use Cargo for functional testing of J2EE application but Cargo is also meant to be used by any application that requires a container to be up and running. It could also be used by IDE plugin writers, etc. For more information on Cargo, please see the Cargo website and join us on the Cargo mailing lists. You'll be warmyl welcomed! :-)
[
vmassol
]
15:50, Friday, 5 November 2004
How often are you trying to debug some Java application to find that you can't continue your debugging easily because the code is entering into some third-party library? At that point, either the library is open sourced and you can rush to download the source, modify the code to add some How good would it be if there was an application (let's call it a Logifier) at which you could throw a jar and it would return a new aspectified jar on which it would have weaved some Logging aspect that you could configure! This would allow us to realize the full power of aspects: an external Java application that was not built with logging can now be converted to log things for us... So who wants to be the first to build such a handy application? :-) Does it already exist? Update 7/11/04: I've just remembered reading about AntFlow on TSS. That would be an excellent way of implement this. Imagine a hot folder called "logifier" and any jar you drop in there is automatically logified using an AspectJ/AspectWerkz/etc Ant task and a common logging aspect such as this one! Now that would be cool. It could be a good coding exercise for the next OSSGTP.
[
vmassol
]
11:07, Thursday, 4 November 2004
OSSGTP stands for Open Source Software Get-Together Paris. It's a montly meeting set up in Paris gathering Open Source actors (mostly Java OSS ATM). We've had our 4th meeting on the 21st of October 2004. This time we had several newcomers: Henry Story, Patrick Chanezon and Luis Arias. Patrick did a presentation on Rome, his pet project and Henry tried to explain to us how to combine ATOM and FOAF and what ATOM/OWL was... Not a simple task is you're not versed in ontologies... ;-) Here are Henry and Luis:
Here's Patrick:
And some of us trying to figure out what OWL, FOAF and ontologies are:
Then, as usual we went for dinner together and had a very nice evening disucssing a bit about everything... A few other pictures are available here. Next time we'll try some coding or review session as suggested on our Wiki. If you're in Paris, feel free to join us. .
[
vmassol
]
10:34, Monday, 1 November 2004
AnalysisI've just tried Omea Pro (build 353) and I've got to say it's very promising! It's hard to explain what Omea is... I think it can be viewed as two things:
After using it for 2 days, here are the pros I have found:
Here are the thing to improve I have noticed (please remember that it is beta software):
Now the real questions is how should I use it? As a search tool? But then it's a bit heavy to be left sitting idle on my desktop. And it's too heavy to start it on demand (it currently takes 30 seconds to 1 minute to start - I'm sure it'll be improved in the future). As a productivity tool? Possibly, although it's missing some of the features I use in my specialized tools. For example:
ConclusionI currently don't think I'll be able to keep Omea open all the time as it's too heavy to have both Outlook and Omea open at the same time. Also, I don't like the fact that I have to stop using my favorite Feed reader (NewzCrawler). I really do not want to manage 2 feed tools and tell each one which feeds I have already read. Of course, I could simply not use the feed feature of Omea. However I feel that using Omea just for searching makes it loose a lot of its attraction. If I just want a search tool, I can use Goodle Desktop or Lookout (even if they are less powerful they are probably good enough for my daily needs). I think the real challenge for JetBrains is to make the tool good enough in each domain (mail handling, feed reading, etc) so that it can be used instead of the dedicated tool. That means that you would use Omea for day to day activities and the specialized tool from time to time only when you need one of the power feature. Of course, this is a huge challenge for JetBrains and honestly I am not sure if it is achievable. Anyway, the tools is promising and intriguing enough so that I'll follow the different builds to see how it evolves. If you're using it, please drop me a note on how you use it and how you handle it vs the specialized tools. Thanks Update 04/11/2004: I've just tried build 358 and I am extremely pleased to report that the memory consumption has decreased a lot: whereas it wasa before 300MB for me, it's now 140MB. Good job! |