Test framework doesn't create XML reports, how to? [message #32470] |
Thu, 13 November 2008 08:56  |
Eclipse User |
|
|
|
Hi all,
I've finally got the Eclipse test framework working. I wrote a little
sample JUnit test. Here it is:
import junit.framework.TestCase;
import junit.framework.Assert;
public class MyTest extends TestCase {
protected void setUp() throws Exception {
System.out.println("MyTest.setup");
}
protected void tearDown() throws Exception {
System.out.println("MyTest.tearDown");
}
public void testPassedTest() throws Exception {
System.out.println("MyTest.testPassedTest");
Assert.assertTrue("testPassedTest is passed", true);
}
public void testFailedTest() throws Exception {
Assert.fail("testFailedTest is failed");
}
}
Pretty simple, isn't it ;-)
I run a command line like:
java -jar plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800. jar
-application org.eclipse.test.coretestapplication -testpluginname
com.company.test -classname com.company.test.MyTest
formattter=org.apache.tools.ant.taskdefs.optional.junit.XMLJ UnitResultFormatter
,com.company.test.MyTest.xml
In the command prompt, I can see all the traces I put into the test case
source code but...nothing more. Here is what I see:
MyTest.setup
MyTest.testPassedTest
MyTest.tearDown
MyTest.setup
MyTest.tearDown
The test report is not created, I don't see any failure or success
information. Now I don't know what to do, any help would be greatly
appreciated.
Thanks in advance.
|
|
|
|
|
|
Re: Test framework doesn't create XML reports, how to? [message #585115 is a reply to message #32470] |
Fri, 14 November 2008 11:39  |
Eclipse User |
|
|
|
Hi, I am doing the same thing, please try different formatters like below
and let me know if it works. I found one command working:
[exec] '--launcher.suppressErrors'
[exec] '-application'
[exec] 'org.eclipse.test.uitestapplication'
[exec] '-dev'
[exec] 'bin'
[exec] '-data' workspace
[exec] '-consoleLog'
[exec]
'formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJ UnitResultFormatter,com.ibm.cic.agent.core.pakInstallAdapter .tests.TrivialTestSuite.xml'
[exec] '-testPluginName'
agent.core.pakInstallAdapter.tests'
[exec] '-className'
[exec]
'com.ibm.cic.agent.core.pakInstallAdapter.tests.TrivialTestS uite'
[exec] '-os'
[exec] 'linux'
[exec] '-ws'
[exec] 'gtk'
[exec] '-arch'
[exec] 'x86'
[exec] '-vmargs'
[exec] '-XrunpiLLCAgent:LLC.deploy,./llc.selected'
[exec]
'-Dcom.ibm.ra.llc.rawreport=/build/buildroot/CIC_WAS/10/C/CI C_WAS10-C20081107_1614/cic-agent-headless-tests/pde-build/.. /LLC.xml'
[exec] '-Dcom.ibm.ra.llc.verbose=false'
[exec] '-Xint'
[exec] '-ea'
[exec] '-Dwtp.autotest.noninteractive=true'
[exec] '-DDISABLE_LIC'
[exec] '-Xmx300M'
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03305 seconds