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.
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
I need the "Run Class" action to actually run some project action. That at least should be trivial; exact same structure as "Compile File".
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.
Created attachment 14463 [details] xtest-qa-functional.diff
Created attachment 14464 [details] IdeInternalExecutionTask.diff
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).
I'll make the Run Single action generic myself.
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.
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.
Verified in recent builds. "Run|Run Other|Run Class" runs internal-execution target as requested.