Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Newbie question about reading in xmi models
Newbie question about reading in xmi models [message #12442] Mon, 28 March 2005 20:14 Go to next message
Eclipse UserFriend
Originally posted by: colemanj.ca.ibm.com

I'm trying to read in the output produced by Rational Performance Tester
(which uses the Hyades Common, Hierarchy and Statistical models) so that I
can convert it to a custom xml format I've defined. The RPT output
consists of 5 files, an execution file (TPFExecutionResult) plus trcaxmi,
trcmxmi, trcnxmi and trcpxmi files (for TRCAgent, TRCMonitor, TRCNode, and
TRCProcessProxy). I think I have to create a fileURI for each file, then
do something like:
Resource resource1 = new XMLResourceImpl(fileURI1);
resource1.load(null);
for each fileURI. But what happens after I've loaded all 5 models? How
do I iterate through the execution file (which contains all the actual
data)? Thanks a lot for any advice you can give.
Re: Newbie question about reading in xmi models [message #14349 is a reply to message #12442] Wed, 06 April 2005 17:17 Go to previous messageGo to next message
Marius Slavescu is currently offline Marius SlavescuFriend
Messages: 67
Registered: July 2009
Member
Hi Joice,

You need to load only the execution result file and iterate through it's
content.

Use one of
test/org.eclipse.hyades.test.core/src/org/eclipse/hyades/tes t/core/util/EMFU
til.load() methods (from TPTP cvs) to load the execution result resource.

You need to run your code from a plugin (headless or not), to run it from a
Java standalone application the setup is more complicated.

Take a look at:
test/org.eclipse.hyades.test.tools.ui/src/org/eclipse/hyades /test/tools/ui/c
ommon/internal/report/jscrib/ReportDataUtils.java
in TPTP CVS for an example on how to navigate the execution result side of
the test model.

Please let me know if you have any problems.

Thanks,
Marius

"Joyce" <colemanj@ca.ibm.com> wrote in message
news:a9fdb6cbd1fe34f244f5d95a605de6e2$1@www.eclipse.org...
> I'm trying to read in the output produced by Rational Performance Tester
> (which uses the Hyades Common, Hierarchy and Statistical models) so that I
> can convert it to a custom xml format I've defined. The RPT output
> consists of 5 files, an execution file (TPFExecutionResult) plus trcaxmi,
> trcmxmi, trcnxmi and trcpxmi files (for TRCAgent, TRCMonitor, TRCNode, and
> TRCProcessProxy). I think I have to create a fileURI for each file, then
> do something like:
> Resource resource1 = new XMLResourceImpl(fileURI1);
> resource1.load(null);
> for each fileURI. But what happens after I've loaded all 5 models? How
> do I iterate through the execution file (which contains all the actual
> data)? Thanks a lot for any advice you can give.
>
Re: Newbie question about reading in xmi models [message #25162 is a reply to message #14349] Thu, 04 August 2005 15:29 Go to previous message
Eclipse UserFriend
Originally posted by: yliu.m1global.com

Could you give an example how to set up to run stand-alone?
I tried:
ResourceSet resourceSet = new ResourceSetImpl();
EPackage.Registry ePackage = EPackage.Registry.INSTANCE;
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put(
Resource.Factory.Registry.DEFAULT_EXTENSION, // "*"
new XMIResourceFactoryImpl());

then:
URI uri = URI.createFileURI("e:/HyadesTests/results/TestRun1.execution ");
Resource rs = resouceSet.getResource(uri, true); --> exception!

exception:
"org.xml.sax.SAXParseException: Content is not allowed in prolog."

(Eclipse3.0.2, Haydes3.3.0)
Thanks.
Previous Topic:some problems about CBE&GLA
Next Topic:New TPTP "News" Mailing List Created
Goto Forum:
  


Current Time: Thu Apr 25 14:34:17 GMT 2024

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

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

Back to the top