Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » How to add attachments (files) to a test execution log
How to add attachments (files) to a test execution log [message #81310] Mon, 21 August 2006 16:41 Go to next message
Bertrand Quenin is currently offline Bertrand QueninFriend
Messages: 70
Registered: July 2009
Member
Hi,
All is in the title ... I just wonder how to send file from the RAC host
(where the test is executed) to the TPTP workbench (where the test log is
built). For example, i'd like to attach log files to execution events. How
can i achieve this ?

Thanks
Re: How to add attachments (files) to a test execution log [message #81354 is a reply to message #81310] Tue, 22 August 2006 08:03 Go to previous messageGo to next message
Bertrand Quenin is currently offline Bertrand QueninFriend
Messages: 70
Registered: July 2009
Member
Just a precision about this, I'm speaking about remote JUnit tests.
Re: How to add attachments (files) to a test execution log [message #98117 is a reply to message #81354] Mon, 07 May 2007 12:10 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Bertrand,
Yes, you can! Here is the code:

import org.eclipse.hyades.test.common.agent.PrimaryTestAgent;

import org.eclipse.hyades.test.common.event.EventAnnotation;

import org.eclipse.hyades.test.common.event.ExecutionEvent;

import org.eclipse.hyades.test.common.event.MessageEvent;



MessageEvent messageEvent = new MessageEvent();

messageEvent.setParentId(ExecutionEvent.ROOT_PARENT);

messageEvent.setSeverity(MessageEvent.INFO);

messageEvent.setText("This is my log file.");


EventAnnotation eventAnnotation = new EventAnnotation();

eventAnnotation.setFile(new File("C:\\myLog.log"));

eventAnnotation.setType("file");


messageEvent.addAnnotation(eventAnnotation);


PrimaryTestAgent.getComptestAgent().write(messageEvent.toStr ing());


Paul
"Bertrand Quenin" <bquenin@axway.com> wrote in message
news:ae9d57c1ec95cbb4bb9e7339a17cfc63$1@www.eclipse.org...
> Just a precision about this, I'm speaking about remote JUnit tests.
>
Previous Topic:Eclipse Testing Framework
Next Topic:Out of heap space when launching tests from ant driver
Goto Forum:
  


Current Time: Tue Mar 19 06:57:52 GMT 2024

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

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

Back to the top