Summary: | [JUnit] Running JUnit tests in ANT should bring up the JUnit UI | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Johan Walles <johan.walles> |
Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | markus.kell.r |
Version: | 3.3.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Johan Walles
2007-10-18 09:25:08 EDT
In 3.3 or later, you can already import xml files generated by the Ant JUnit task: 1. run junit ant task with <junit printsummary="yes"> <formatter type="xml"/> ... 2. optionally create a summary: <junitreport todir="${result}"> <fileset dir="${result}"> <include name="TEST-*.xml"/> </fileset> </junitreport> 3. in JUnit view, open the menu on the 'Test Run History' button, choose Import..., and select the generated TEST-yourTest.xml or TESTS-TestSuites.xml file. You won't get progress reporting with this, but at least you can browse the tests more easily. Possible enhancements: - Make it easier to open test result files: - support drag and drop of test result files into the JUnit view - support opening test result files by double-click or via a file link in the Console view A full-fledged solution would be this (however, JDT/UI has currently no resources to implement this): - Write a JUnitResultFormatter for clients to use in their <junit> tasks. - Formatter is informed about test progress and can post results to the JUnit view. - Open question: how can we feed the data from the formatter to the JUnit view (probably need some socket connection like in the RemoteTestRunner/-Client), but this is difficult to set up for external Ant launches). Another approach could be an Ant task that opens the generated xml files in Eclipse after the tests have finished. Drawbacks: - clients must manually add the task to the Ant classpath - no progress - telling a running Eclipse instance to open a file is difficult, see bug 4922 and bug 178927 See also related bug 206879. |