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.

Bug 42083 - Add action to run functional test internally in IDE
Summary: Add action to run functional test internally in IDE
Status: CLOSED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-16 16:09 UTC by Jiri Skrivanek
Modified: 2006-03-24 10:11 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
xtest-qa-functional.diff (407 bytes, patch)
2004-04-19 16:05 UTC, Jiri Skrivanek
Details | Diff
IdeInternalExecutionTask.diff (972 bytes, patch)
2004-04-19 16:06 UTC, Jiri Skrivanek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2004-04-16 16:09:09 UTC
Please, add action to run test class in the same
JVM as IDE runs. There was added a Task to XTest
which should serve for that purpose
(xtest/plugins_src/ide/src/org/netbeans/xtest/plugin/ide/IdeInternalExecutionTask.java).
 Also templates nbbuild/templates/xtest.xml and
xtest-qa-functional.xml were modified.

Actions should be linked to:

ant -f <module>/test/build.xml
-Dxtest.testtype=qa-functional
-Dclassname=fully.qualified.class.name
internal-execution
Comment 1 Jesse Glick 2004-04-16 16:31:49 UTC
I need the "Run Class" action to actually run some project action.
That at least should be trivial; exact same structure as "Compile File".
Comment 2 Jiri Skrivanek 2004-04-19 16:04:17 UTC
I tried to modify executor to run junit.textui.TestRunner.main with
test class argument but it failed because test class was not found. I
don't have any idea why. If someone can look at it, I am attaching my
diffs.
Anyway I am fine with running main method of test class.
Comment 3 Jiri Skrivanek 2004-04-19 16:05:33 UTC
Created attachment 14463 [details]
xtest-qa-functional.diff
Comment 4 Jiri Skrivanek 2004-04-19 16:06:05 UTC
Created attachment 14464 [details]
IdeInternalExecutionTask.diff
Comment 5 Jesse Glick 2004-04-19 17:13:09 UTC
Probably needs a special TestSuiteLoader. The default StandardTSL just
does Class.forName(String) which assumes the test class can be found
in the same loader as junit.jar, which is probably not true for
internal execution of tests (but I am only guessing here).
Comment 6 Jesse Glick 2004-04-19 18:20:09 UTC
I'll make the Run Single action generic myself.
Comment 7 Jiri Skrivanek 2004-04-21 13:56:09 UTC
Would it be possible to make it till monday 26-th? I was urged to show
a demo about XTest and tests and it would be nice to show internal
execution as well. Thanks.
Ad TestSuiteLoader. You are probably right, but I don't know how to
work it out. And I think an extra effort to solve it is not worth.
Comment 8 Jesse Glick 2004-04-21 16:40:35 UTC
Should be there in the trunk:

committed   * Up-To-Date  1.3        
projects/projectui/src/org/netbeans/modules/project/ui/actions/Actions.java
committed   * Up-To-Date  1.13       
apisupport/project/src/org/netbeans/modules/apisupport/project/Actions.java

Some notes:

- Will not be enabled in the $module/test/qa-functional/ dir is
incorrectly marked as a project, e.g. java/test/qa-functional/ is
broken for this reason.

- Trying to run it on validation.IDECommitValidation, I just got
errors that NbBundle could not be loaded. Something for you to deal
with I guess.
Comment 9 Jiri Skrivanek 2004-04-26 12:30:52 UTC
Verified in recent builds. "Run|Run Other|Run Class" runs
internal-execution target as requested.