views:

465

answers:

3

Is there any tool or framework able to make it easier to test distributed software written in Java? My system under test is a peer-to-peer software, and I'd like to perform testing using something like PNUnit, but with Java instead of .Net.

The system under test is a framework I'm developing to build P2P applications. It uses JXTA as a lower subsystem, trying to hide some complexities of it. It's currently an academic project, so I'm pursuing simplicity at this moment.

In my test, I want to demonstrate that a peer (running in its own process, possibly with multiple threads) can discover another one (running in another process or even another machine) and that they can exchange a few messages. I'm not using mocks nor stubs because I need to see both sides working simultaneously. I realize that some kind of coordination mechanism is needed, and PNUnit seems to be able to do that.

I've bumped into some initiatives like Pisces, which "aims to provide a distributed testing environment that extends JUnit, giving the developer/tester an ability to run remote JUnits and create complex test suites that are composed of several remote JUnit tests running in parallel or serially", but this project and a few others I have found seem to be long dead.

+1  A: 

Testing distributed software depends greatly on what type of software it is, so for a complete answer I will need to know what your software does. However looking at PNUnit it seams that most of what it does is allow for synchronization, ordering and parallel execution of tests. TestNG also supports this, for instance, you can do:

@Test(threadPoolSize = 3, invocationCount = 10,  timeOut = 10000)
public void testServer() {
   :
}

which will invoke the function testServer ten times from three different threads. The change-log of TestNG 4.5 also hints at the possibility of running remote tests, more info is available in this blog post.

Lars Tackmann
Lars, thanks a lot for your attention. I've augmented the description about the software. Please, let me know if you need additional details to figure it out better. In this particular case, I think PNUnit is closer to satisfy my requirements than TestNG (unfortunately, I don't want to work with another platform besides Java, so PNUnit is out of question for me), but the truth is that I don't know TestNG as well as JUnit. I'll give it some more attention, but I'm afraid I'm in a blind alley here...
A: 

Hi guys,

Do you find what were looking for? I also am looking for a tool or framwwork to test distributed system.

Thanks for any help, Giovanni

Giovanni Farias
Besides the already mentioned projects, no, I didn't find anything that fits my needs.On the other hand, I just created one! Well, sort of. It works as a JUnit extension, which is nice because, among other things, I can set the whole test environment using Eclipse, for example.The downside is it is still a work in progress, so features I consider needed, as a better control of failed tests in a distibuted running test suite are not implemented yet. Maybe turning it into an open source project would be good. But right now I don't have time nor help to do that.
A: 

Hi friend,

Do you have any paper or site about your work? I'm interested for it.

[]'s Giovanni

Giovanni Farias
No, I haven't. Maybe it will be part of my master's thesis, currently an ongoing work.