1.1 --- a/testng.maven/nbproject/project.xml Sun Jan 01 18:47:55 2012 +0100
1.2 +++ b/testng.maven/nbproject/project.xml Mon Jan 02 08:25:21 2012 +0100
1.3 @@ -107,6 +107,22 @@
1.4 </run-dependency>
1.5 </dependency>
1.6 <dependency>
1.7 + <code-name-base>org.openide.io</code-name-base>
1.8 + <build-prerequisite/>
1.9 + <compile-dependency/>
1.10 + <run-dependency>
1.11 + <specification-version>1.30</specification-version>
1.12 + </run-dependency>
1.13 + </dependency>
1.14 + <dependency>
1.15 + <code-name-base>org.openide.util</code-name-base>
1.16 + <build-prerequisite/>
1.17 + <compile-dependency/>
1.18 + <run-dependency>
1.19 + <specification-version>8.21</specification-version>
1.20 + </run-dependency>
1.21 + </dependency>
1.22 + <dependency>
1.23 <code-name-base>org.openide.util.lookup</code-name-base>
1.24 <build-prerequisite/>
1.25 <compile-dependency/>
2.1 --- a/testng.maven/src/org/netbeans/modules/contrib/testng/maven/MavenTestNGSupport.java Sun Jan 01 18:47:55 2012 +0100
2.2 +++ b/testng.maven/src/org/netbeans/modules/contrib/testng/maven/MavenTestNGSupport.java Mon Jan 02 08:25:21 2012 +0100
2.3 @@ -77,6 +77,7 @@
2.4 s.add(Action.RUN_FAILED);
2.5 s.add(Action.RUN_TESTMETHOD);
2.6 s.add(Action.RUN_TESTSUITE);
2.7 + s.add(Action.DEBUG_TESTSUITE);
2.8 SUPPORTED_ACTIONS = Collections.unmodifiableSet(s);
2.9 }
2.10
2.11 @@ -115,7 +116,14 @@
2.12 }
2.13
2.14 public void execute(Action action, TestConfig config) throws IOException {
2.15 - RunConfig rc = new TestNGActionsProvider().createConfigForDefaultAction("testng.test", p, Lookups.singleton(config.getTest()));
2.16 + RunConfig rc;
2.17 + if (Action.DEBUG_TESTSUITE.equals(action)
2.18 + || Action.DEBUG_TEST.equals(action)
2.19 + || Action.DEBUG_TESTMETHOD.equals(action)) {
2.20 + rc = new TestNGActionsProvider().createConfigForDefaultAction("testng.debug", p, Lookups.singleton(config.getTest()));
2.21 + } else {
2.22 + rc = new TestNGActionsProvider().createConfigForDefaultAction("testng.test", p, Lookups.singleton(config.getTest()));
2.23 + }
2.24 // MavenProject mp = rc.getMavenProject();
2.25 rc.setProperty("netbeans.testng.action", "true"); //NOI18N
2.26 if (config.doRerun()) {
2.27 @@ -123,7 +131,7 @@
2.28 // mp.addPlugin(createPluginDef(failedConfPath));
2.29 } else {
2.30 File f = null;
2.31 - if (Action.RUN_TESTSUITE.equals(action)) {
2.32 + if (Action.RUN_TESTSUITE.equals(action) || Action.DEBUG_TESTSUITE.equals(action)) {
2.33 f = FileUtil.toFile(config.getTest());
2.34 } else {
2.35 f = XMLSuiteSupport.createSuiteforMethod(
3.1 --- a/testng.maven/src/org/netbeans/modules/contrib/testng/maven/testngActionMappings.xml Sun Jan 01 18:47:55 2012 +0100
3.2 +++ b/testng.maven/src/org/netbeans/modules/contrib/testng/maven/testngActionMappings.xml Mon Jan 02 08:25:21 2012 +0100
3.3 @@ -2,7 +2,7 @@
3.4 <!--
3.5 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3.6
3.7 -Copyright © 2008-2011 Oracle and/or its affiliates. All rights reserved.
3.8 +Copyright © 2008-2012 Oracle and/or its affiliates. All rights reserved.
3.9
3.10
3.11 The contents of this file are subject to the terms of either the GNU
3.12 @@ -51,4 +51,19 @@
3.13 <goal>surefire:test</goal>
3.14 </goals>
3.15 </action>
3.16 + <action>
3.17 + <actionName>testng.debug</actionName>
3.18 + <packagings>
3.19 + <packaging>*</packaging>
3.20 + </packagings>
3.21 + <goals>
3.22 + <goal>test-compile</goal>
3.23 + <goal>surefire:test</goal>
3.24 + </goals>
3.25 + <properties>
3.26 + <jpda.listen>true</jpda.listen>
3.27 +<!-- ", "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE-->
3.28 + <maven.surefire.debug>-Xdebug -Xrunjdwp:transport=dt_socket,suspend=n,server=n,address=${jpda.address}</maven.surefire.debug>
3.29 + </properties>
3.30 + </action>
3.31 </actions>
3.32 \ No newline at end of file