Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Test framework doesn't create XML reports, how to?
Test framework doesn't create XML reports, how to? [message #32470] Thu, 13 November 2008 13:56 Go to next message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
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 #32783 is a reply to message #32470] Fri, 14 November 2008 16:39 Go to previous messageGo to next message
yonghe is currently offline yongheFriend
Messages: 6
Registered: July 2009
Junior Member
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'
Re: Test framework doesn't create XML reports, how to? [message #32839 is a reply to message #32470] Fri, 14 November 2008 16:43 Go to previous messageGo to next message
yonghe is currently offline yongheFriend
Messages: 6
Registered: July 2009
Junior Member
IMHO, you might need the -data parameter, I dont know, I am not that far
yet.
Another thing, I could not find/download
org.eclipse.test.coretestapplication package, can you tell me where to
download it, appreciate.
Re: Test framework doesn't create XML reports, how to? [message #33444 is a reply to message #32839] Mon, 17 November 2008 14:44 Go to previous message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
"org.eclipse.test.coretestapplication" is provided in the old Eclipse test
framework, and I gave up this way, this seems to not been maintained
anymore...useless way.

You'd better use the "org.eclipse.pde.junit.runtime.coretestapplication".
Like explained here:
http://www.eclipse.org/articles/article.php?file=Article-PDE JUnitAntAutomation/index.html

Best regards.
Re: Test framework doesn't create XML reports, how to? [message #585115 is a reply to message #32470] Fri, 14 November 2008 16:39 Go to previous message
yonghe is currently offline yongheFriend
Messages: 6
Registered: July 2009
Junior Member
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'
Re: Test framework doesn't create XML reports, how to? [message #585126 is a reply to message #32470] Fri, 14 November 2008 16:43 Go to previous message
yonghe is currently offline yongheFriend
Messages: 6
Registered: July 2009
Junior Member
IMHO, you might need the -data parameter, I dont know, I am not that far
yet.
Another thing, I could not find/download
org.eclipse.test.coretestapplication package, can you tell me where to
download it, appreciate.
Re: Test framework doesn't create XML reports, how to? [message #585410 is a reply to message #32839] Mon, 17 November 2008 14:44 Go to previous message
romu is currently offline romuFriend
Messages: 34
Registered: July 2009
Member
"org.eclipse.test.coretestapplication" is provided in the old Eclipse test
framework, and I gave up this way, this seems to not been maintained
anymore...useless way.

You'd better use the "org.eclipse.pde.junit.runtime.coretestapplication".
Like explained here:
http://www.eclipse.org/articles/article.php?file=Article-PDE JUnitAntAutomation/index.html

Best regards.
Previous Topic:StickyView
Next Topic:How to change plugin.xml programmatically?
Goto Forum:
  


Current Time: Wed Aug 04 00:22:01 GMT 2021

Powered by FUDForum. Page generated in 0.02743 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top