Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Get console result from TPTPProcess
Get console result from TPTPProcess [message #119534] Fri, 14 December 2007 07:43 Go to next message
Eclipse User
Originally posted by: cguibert.axway.com

Hello

In my test, I need to run an application that write some data to the
console, in particularly, whether the start process was OK or not. So I
need to get the console output in order check if my TestMethod is success
or failed.
I'm using the TPTPProcess sample to do that, but I'm not able to get the
console output using the sample.
I did the below tests:
Test1:
proc.setExecutable("myApplication");
proc.setParameter(" >toto.out 2>toto.err");

Test2:
proc.setExecutable("MyTest.bat")
where MyTest.bat contains the following:
@echo off
myApplication >toto.out 2> toto.err

But I have no ways to get the console output in my Test.

I guess I missed something but I can't see what.
Do you have any idea ?

Regards
Re: Get console result from TPTPProcess [message #119559 is a reply to message #119534] Sat, 15 December 2007 11:32 Go to previous messageGo to next message
Igor Alelekov is currently offline Igor Alelekov
Messages: 139
Registered: July 2009
Senior Member
Hi,
Console data should be processed by the another way.
What API are using - new (org.eclipse.tptp.platform.execution...) or old
(org.eclipse.hyades.execution...)?
Regards,
Igor
Re: Get console result from TPTPProcess [message #119674 is a reply to message #119559] Mon, 17 December 2007 11:09 Go to previous messageGo to next message
Eclipse User
Originally posted by: cguibert.axway.com

Hello Igor

The new API are used. What 'other way' should I use ?

Regards

CG
Re: Get console result from TPTPProcess [message #119687 is a reply to message #119674] Tue, 18 December 2007 02:57 Go to previous message
Igor Alelekov is currently offline Igor Alelekov
Messages: 139
Registered: July 2009
Senior Member
Hi CG,
To get console data you need to set a DataProcessor to the console:

IConsole console = process.getConsole();
console.setDataProcessor(...);

Please find the console example in the
org.eclipse.tptp.platform.execution.samples.TPTPProcess.java sample.

Regards,
Igor
Previous Topic:[AGR] AGR's future???
Next Topic:Problems with TPTP Profiler
Goto Forum:
  


Current Time: Sat Aug 30 04:26:04 EDT 2014

Powered by FUDForum. Page generated in 0.02208 seconds