Re: Automated tests in SmartFrog

Steve Loughran <[email protected]>
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <[email protected]>
Gustavo Wagner wrote:
> Hello all.
> 
>     I've sent an e-mail on January, 2003 about the automated tests in 
> SmartFrog environment. 


> First I would like to know if the automated tests 
> of SmartFrog can be stored on the SmartFrog site. 

As Kumar pointed out, the core of our tets are in CVS, under 
testharness. Some components keep their
test suite in their own project, in the test/ subdirectory.

They are all JUnit tests. We deploy things and then test that the 
deployed stuff is present. For example our testMethod() could do an 
sfResolve to some components and then mainipulate the (RMI) object.

If you look at testharness/src/, the class 
org.smartfrog.test.SmartFrogTestBase can act as a base class for your 
JUnit test cases, it has helper functions to do useful things, like 
deployExpectingException(). The build file for this project puts this 
class and some others into a JAR, for using in your own project.

We split tests into unit and functional. Unit tests test classes in the 
code, functional tests require deployed systems to test against.

The nightly Gump run [1] runs all the unit tests, but not the functional 
ones; we turn that off for security reasons. We also have a 
behind-the-firewall copy of CruiseControl running that sends mail to 
everyone who checked something in if the check in breaks. A public 
cruise control is on the todo list, I can assure you.



>Second, are there an 
> automated way to test all the lifecycle of a component(using JUnit, for 
> example)?


This is something we can still improve. With output tracing, we should 
be able to make assertions about the transition history of components; 
imagine a logging trace that saves the transition history into a 
structure you can browse and assert on.

We also have a Junit component that lets you deploy arbitrary tests onto 
arbitrary machines. This is very cool, but needs more use to find out 
where it can be improved. I think reporting needs work, for example. We 
collect the test results back on a central aggregating component, but 
need to generate human-readable HTML from it.

If you want to get into testing/distributed testing, I'd be glad to 
help, as this an area of both practical value and research interest.

-steve


[1] http://brutus.apache.org/gump/public/smartfrog/index.html


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.