| Summary: | [JUnit] Custom Runners cannot communicate file information | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Matt Fowles <matt.fowles> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | ASSIGNED --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | markus.kell.r, moritz.eysholdt |
| Version: | 3.7 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Matt Fowles
We're open for enhancements, but we don't have the resources to implement this on our own. Note that JUnit tests run in a separate VM and we have a wire protocol that shuffles information from the test VM back to Eclipse (RemoteTestRunner/RemoteTestRunnerClient), so if we have to look at annotations on a Description, that will require bigger changes. I don't even know if that would be feasible, since Descriptions are sometimes re-created in JUnit and I not sure the annotations survive that (e.g. Description#equals(Object) doesn't care). If this is just about using a different mechanism to open a test method that still uses Description#getTestClass() but replaces Description#getMethodName(), then things are probably a lot easier, since we can implement everything on the client side in org.eclipse.jdt.internal.junit.ui.OpenTestAction. I.e. find the type using existing code and then using IType#getAnnotations() to find out what file to open. Trying to keep this in sync with the ticket on JUnit. My suggestion runs as follows: Currently the UI uses: Description.getTestClass()/Description.getClassName() -- not sure which Description.getMethodName() which is unfortunately very specific to a JUnit class runner. I would suggest adding Description.hasCustomLocation() Description.getFileName() Description.getLineNumber() where the first method indicates that the other two should be used. see also Bug 391023 |