jantox
jantox

Reputation: 2185

Integrating JUnit in a Java Application

Is there a way to integrate the JUnit window to a Java application?

Upvotes: 0

Views: 483

Answers (2)

Matthew Farwell
Matthew Farwell

Reputation: 61695

The JUnit view is highly integrated and dependent upon the Eclipse (not just RCP) environment, the junit plugins are quite complex and would probably not be a good place to start. It would be very difficult to integrate them into another application. Your best bet would be to write your own GUI, and integrate JUnit yourself.

If you still want to do this, then the source for the JUnit plugins is available from

  1. org.eclipse.jdt.junit: git://dev.eclipse.org/org.eclipse.jdt/org.eclipse.jdt.junit.git
  2. org.eclipse.jdt.junit.core: git://dev.eclipse.org/org.eclipse.jdt/org.eclipse.jdt.junit.core.git
  3. org.eclipse.jdt.junit.runtime: git://dev.eclipse.org/org.eclipse.jdt/org.eclipse.jdt.junit.runtime.git
  4. org.eclipse.jdt.junit4.runtime: git://dev.eclipse.org/org.eclipse.jdt/org.eclipse.jdt.junit4.runtime.git

For a start, see my answer to the question How does Eclipse actually run Junit tests?

Upvotes: 2

fmatar
fmatar

Reputation: 3470

You can do that if your using swt, then all you have to do is check the JUnit plugin source code and integrate accordingly, I'm afraid this would be a little of a mess if you're not familiar with programming in the eclipse environment. As an alternative, go through the JUnit api and build your interface accordingly.

Upvotes: 0

Related Questions