开发者

Dynamic Junit Test

开发者 https://www.devze.com 2023-01-09 03:31 出处:网络
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开发者_如

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开发者_如何学Go 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


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


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:

How should I load Jars dynamically at runtime?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消