| Issue 9: | Question - running testng in eclipse w/ tptp's profile | |
| 9 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. Start Eclipse. Make sure you have the eclipse testing platform (TPTP) and testng eclipse plugin installed. 2. Try and create a new profile executable What is the expected output? What do you see instead? The profile config dialog comes up (see attached). I cannot locate the testng run type in the tree on the left like I can when I create a normal or debug run profile. What version of the product are you using? On what operating system? TestNG 5.4.0.0 TPTP platform project 4.3.1v200701291655 Eclipse 3.2.2 Windows XP sp2 Please provide any additional information below.
Aug 14, 2007
#1
danapsi...@gmail.com
May 7, 2008
I'm facing similar issue. Just wondering if there's a solution to this issue.
May 7, 2008
No one has replied, and I haven't found a way to do it myself. I just create plain JUnit tests for the things I absolutely want to profile. -Ian
May 29, 2008
I also looking forward to a solution to profile testng tests :)
Jan 15, 2009
I also would like to profile my testng suites :( Any news on when this would be available would be nice
May 14, 2009
TPTP only supports certain launch configurations, one of which is not TestNG. I just
made a class like so and executed it as a java app:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.TestNG;
public class TestNGCommandLine {
private static final Logger logger =
LoggerFactory.getLogger(TestNGCommandLine.class);
public static void main(String[] args) {
logger.debug("Beginning testng w/: " + TestNGCommandLine.class.getResource(
"/AllTests.tng.xml").getPath());
TestNG.main(new String[] { TestNGCommandLine.class.getResource(
"/AllTests.tng.xml").getPath() });
}
}
Now you can profile the java application itself. Granted, this is just a workaround...
Dec 7, 2009
A single testcase can be started from within its class by adding a main-methode like
this:
public static final void main(final String... args) {
TestNG testng = new TestNG();
testng.setTestClasses(new Class[]{TestCase.class});
testng.run();
logger.info("TestNG status: " + testng.getStatus());
}
where TestCase.class is the TestCase class you wanted to profile.
Start TPTP profiling with the contextmenu "Profile As - Java Application" in the
eclipse package explorer.
You do not have to create the xml file.
|