tags:

views:

93

answers:

2

Hi, I would like to execute JUnit on a remote machine hosting a JVM embedded and linked to a C application through JNI. This JVM has state and access to live external resources and data which of course are not available in my build/test environment. In addition, my test/dev JVM is not linked to the C application and uses mock objects, so the behavior in test/live environments are totally different

My JUnit currently focus on unit testing but I would like to run functional on the live remote JVM. I had a look to TPTP but it seems to focus on profiling, I could not find any resources or help on this... Anyone with a similar problem? (of course I could build something ad-hoc but I'd rather save time...)

Thanks.

A: 

Presumbly you can arrange to have some additional libraries added to that JVM's classpath? So you could get some initial "bootstrap" code in place.

I wonder whether you could adapt Cactus for use here. I've only used for testing in the context of a servlet, but I think it could be adapted for your scenario.

djna
A: 

Can you run the tests directly at the command line on the remote machine, using e.g. Ant tasks, or Maven, or even the text-based junit TestRunner?

Or are you talking about an app deployed into some sort of app server, so that tests must be run in-container? More details would help.

Mirko Nasato
Yes it's running in some sort of app server providing various services connected to databases and feeds... so clearly in container. TPTP sounded like something good but I'll have a look at cactus or building my own stuff on top of JUnit.
__JM__