How do I run JUnit tests from inside my java application?
Posted
by corgrath
on Stack Overflow
See other posts from Stack Overflow
or by corgrath
Published on 2010-03-30T08:54:21Z
Indexed on
2010/04/01
18:13 UTC
Read the original article
Hit count: 259
Is it possible to run JUnit tests from inside my java application?
Are there test frameworks I can use (such as JUnit.jar?), or am I force to find the test files, invoke the methods and track the exceptions myself?
The reason why I am asking is my application requires a lot of work to start launch (lots of dependencies and configurations, etc) and using an external testing tool (like JUnit Ant task) would require a lot of work to set up.
It is easier to start the application and then inside the application run my tests.
Is there an easy test framework that runs tests and output results from inside a java application or am I forced to write my own framework?
© Stack Overflow or respective owner