This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Overly general Project argument to TestSession | ||
---|---|---|---|
Product: | utilities | Reporter: | Jesse Glick <jglick> |
Component: | Test Runner | Assignee: | Theofanis Oikonomou <theofanis> |
Status: | NEW --- | ||
Severity: | blocker | CC: | emononen |
Priority: | P2 | Keywords: | API |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 158018, 158019, 187004 |
Description
Jesse Glick
2009-03-04 00:10:57 UTC
It's passed to Report and gets used at least by the Ruby test runner, though the project might not need to be passed to it through TestSession. Need to look at this again with more time. Now Project is used to get the FileLocator implementation from the project's lookup. I am planning to create the FileLocator based on the project classpath in case there is nothing found in the lookup. Also it's in plans to add some default actions to the nodes such as "Go to source", "Run Test", "Debug Test" which will use the FileLocator to get the FileObject's for the test files. So, now it's used a little but will be used more in the nearest future. Closing as INVALID. Please consider requesting an argument more specific than Project that reflects what you will actually need - a FileLocator, etc. (Rather than defaulting the FileLocator based on project CP, have a factory method to create a standard locator from a ClassPathProvider or whatever it is you use.) I would like to be able to use this API from the Hudson integration module to display test results run on the remote server that may not correspond to any local Project whatsoever. While I could create a fake Project object whose sole purpose is to have a Lookup with some required interfaces in it, assuming I can even find what is required, this seems stupid. I checked the usages in the Ruby test runner, and it seems that from its point of view the Project argument is not necessarily needed in TestSession. I need a Project instance in various places in the test node implementations, but I could easily have the project instance passed to my nodes by my TestRunnerNodeFactory implementation. (The Project arguments in the TestRunnerNodeFactory methods are also not neeeded by the Ruby client). Workaround: pass new Project() { public @Override FileObject getProjectDirectory() { return FileUtil.createMemoryFileSystem().getRoot(); } public @Override Lookup getLookup() { return Lookup.EMPTY; } } |