Run JUnit tests programmatically [message #127311] |
Thu, 11 September 2003 07:03  |
Eclipse User |
|
|
|
Hi,
I wonder if there is a built-in solution in Eclipse that allows me to
programmatically launch a JUnit test -- without accessing any internal
methods.
I know about the ITestRunListener and about the JUnitCore interface/class,
but I cannot find any method to actively launch a JUnit test. So what I
did is that I have implemented my own LaunchDelegate which runs a JUnit
test (actually I just copied some of the internal classes of jdt.junit and
removed the things that I was not interested in). This approach does work,
but there are some drawbacks. First, I have to do my own "connection" (the
junit tests run in a different VM, so to communicate with eclipse, I have
to establish a "remote" connection via a PrintWriter/Reader to
communicate), second, I have to re-implement the ui instead of being able
to re-use it.
So, to sum it up: are there currently any possibilities to actively
(re-)run a JUnit test, or are any enhancements to the interface planned in
the future?
Thanks,
Philipp
|
|
|
Re: Run JUnit tests programmatically [message #276411 is a reply to message #127311] |
Tue, 23 November 2004 07:46  |
Eclipse User |
|
|
|
Originally posted by: choi.netlabs.org
Hi,
any news on this question since it was posted?
-- Matt
Philipp Bouillon wrote:
> Hi,
>
> I wonder if there is a built-in solution in Eclipse that allows me to
> programmatically launch a JUnit test -- without accessing any internal
> methods.
>
> I know about the ITestRunListener and about the JUnitCore interface/class,
> but I cannot find any method to actively launch a JUnit test. So what I
> did is that I have implemented my own LaunchDelegate which runs a JUnit
> test (actually I just copied some of the internal classes of jdt.junit and
> removed the things that I was not interested in). This approach does work,
> but there are some drawbacks. First, I have to do my own "connection" (the
> junit tests run in a different VM, so to communicate with eclipse, I have
> to establish a "remote" connection via a PrintWriter/Reader to
> communicate), second, I have to re-implement the ui instead of being able
> to re-use it.
>
> So, to sum it up: are there currently any possibilities to actively
> (re-)run a JUnit test, or are any enhancements to the interface planned in
> the future?
>
> Thanks,
> Philipp
>
|
|
|
Powered by
FUDForum. Page generated in 0.05575 seconds