Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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 12:41 Go to next message
Bertrand Quenin is currently offline Bertrand Quenin
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 04:03 Go to previous messageGo to next message
Bertrand Quenin is currently offline Bertrand Quenin
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 08:10 Go to previous message
Paul Slauenwhite is currently offline Paul Slauenwhite
Messages: 970
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: Thu Jul 31 19:55:49 EDT 2014

Powered by FUDForum. Page generated in 0.06813 seconds