Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Run JUnit tests programmatically
Run JUnit tests programmatically [message #127311] Thu, 11 September 2003 07:03 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:asterisk not going away on save
Next Topic:adding a scroll to a group in swt.
Goto Forum:
  


Current Time: Thu May 08 07:41:22 EDT 2025

Powered by FUDForum. Page generated in 0.05575 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top