[hg] main-silver: #229860 - Ctrl-F6 (Test File) does not work fr...

  • From: Theofanis Oikonomou < >
  • To: , ,
  • Subject: [hg] main-silver: #229860 - Ctrl-F6 (Test File) does not work fr...
  • Date: Fri, 17 May 2013 14:47:49 -0700

changeset 19aeb2856de1 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/19aeb2856de1
description:
        #229860 - Ctrl-F6 (Test File) does not work from the tested classes 
for TestNG tests in NB module projects

diffstat:

 
apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
 |  6 ++++++
 nbbuild/templates/common.xml                                                 
    |  3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)

diffs (53 lines):

diff --git 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
--- 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
+++ 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/ModuleActions.java
@@ -244,6 +244,7 @@
     
     private static final Pattern SRCDIRJAVA = Pattern.compile("\\.java$"); 
// NOI18N
     private static final String SUBST = "Test.java"; // NOI18N
+    private static final String SUBSTNG = "NGTest.java"; // NOI18N
     
     private FileObject[] findSources(Lookup context) {
         FileObject srcDir = project.getSourceDirectory();
@@ -342,9 +343,14 @@
         if (matches != null) {
             return new TestSources(matches, testType, testSrcDir, null);
         } else {
+           matches = ActionUtils.regexpMapFiles(sourceFiles, srcDir, 
SRCDIRJAVA, testSrcDir, SUBSTNG, true);
+           if (matches != null) {
+               return new TestSources(matches, testType, testSrcDir, null);
+           } else {
             return null;
         }
     }
+    }
     
     @Messages("MSG_no_source=No source to operate on.")
     public void invokeAction(final String command, final Lookup context) 
throws IllegalArgumentException {
diff --git a/nbbuild/templates/common.xml b/nbbuild/templates/common.xml
--- a/nbbuild/templates/common.xml
+++ b/nbbuild/templates/common.xml
@@ -709,6 +709,7 @@
                         outputdir="${build.test.@{test.type}.results.dir}"
                         workingDir="${build.test.@{test.type}.results.dir}"
                         suitename="${code.name.base}"
+                       listener="org.testng.reporters.VerboseReporter"
                 >
                     <classfileset 
dir="${build.test.@{test.type}.classes.dir}" excludes="${test.excludes}" 
includes="${test.includes}"/>
                     <propertyset refid="test.@{test.type}.properties"/>
@@ -805,6 +806,7 @@
                          outputdir="${build.test.@{test.type}.results.dir}"
                          workingDir="${build.test.@{test.type}.results.dir}"
                          suitename="${code.name.base}"
+                        listener="org.testng.reporters.VerboseReporter"
                 >
                     <propertyset refid="test.@{test.type}.properties"/>
                     <classpath refid="test.@{test.type}.run.cp"/>
@@ -987,6 +989,7 @@
                         outputdir="${build.test.@{test.type}.results.dir}"
                         workingDir="${build.test.@{test.type}.results.dir}"
                         suitename="${code.name.base}"
+                       listener="org.testng.reporters.VerboseReporter"
                 >
                     <propertyset refid="test.@{test.type}.properties"/>
                     <classpath refid="test.@{test.type}.run.cp"/>

[hg] main-silver: #229860 - Ctrl-F6 (Test File) does not work fr...

Theofanis Oikonomou 05/17/2013

Project Features

About this Project

APIsupport was started in November 2009, is owned by Antonin Nebuzelsky, and has 43 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close