tags:

views:

56

answers:

2

Hello As part of my study final project I have to make a J2EE application that allows users to run JUnit tests(without any experience what they have to do is to click and see the result), obviously it must be some way to modify tests and create new ones (upload new test files ...) could you point me to the right technology which allows me to load and run tests on the fly?? thank you in advance for your help

A: 

Hi,

you can take a look at implementation (sources) of Pax Exam OSGi testing tool (1). This tool generates OSGi bundles from JUnit tests on the fly and runs them inside test OSGi container. You can implement the same approach for J2EE.

Hope it helps you to analyze and make an estimate your project bounds.

Cheers, Dmytro

(1): http://wiki.ops4j.org/display/paxexam/Pax+Exam

Dmytro Pishchukhin
thank you for your help
A: 

You could create your own implementation of a JUnit test runner that has an option for dynamically loading test JARs and dependency JARs during runtime. Take a look at the JUnitCore class and related classes in the JUnit APIs such as Result. Also look into dynamic JAR loading.

JUnitCore:

http://kentbeck.github.com/junit/javadoc/latest/

Dynamic JAR loading:

http://stackoverflow.com/questions/60764/how-should-i-load-jars-dynamically-at-runtime

http://sourceforge.net/projects/jcloader/

Vapen