Bug 283304 - [JUnit] ITestRunSession should return launched project
Summary: [JUnit] ITestRunSession should return launched project
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6 M1   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2009-07-13 07:55 EDT by Michael Seele CLA
Modified: 2009-07-17 13:46 EDT (History)
2 users (show)

See Also:


Attachments
Patch (629 bytes, patch)
2009-07-13 10:27 EDT, Michael Seele CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Seele CLA 2009-07-13 07:55:31 EDT
Please add access for getLaunchedProject() of org.eclipse.jdt.internal.junit.model.TestRunSession in org.eclipse.jdt.junit.model.ITestRunSession.
My problem is that i need the launched project to reproduce and analyse the testCases (ITestCaseElement). The only "data" i get is the testClassName and testMethodName but that is not unique in the workspace. If you make getLaunchedProject() public over ITestRunSession, i will find the correct testCase everytime correct.

Workaround is so cast the org.eclipse.jdt.junit.model.ITestRunSession object into org.eclipse.jdt.internal.junit.model.TestRunSession and invoke getLaunchedProject(). But this is the bad way cause TestRunSession is internal.
Comment 1 Dani Megert CLA 2009-07-13 10:18:28 EDT
Patch welcome.
Comment 2 Michael Seele CLA 2009-07-13 10:27:38 EDT
Created attachment 141424 [details]
Patch
Comment 3 Markus Keller CLA 2009-07-17 13:46:03 EDT
Fixed in HEAD (will only go into the I-build of the week after next). Did not use the patch.