Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » [SOLVED] Is it possible to use java portion of code in RCPTT test case ?(#exec-process_command #read_xls_file #read_external_file #java #match_table_data)
icon5.gif  [SOLVED] Is it possible to use java portion of code in RCPTT test case ? [message #1711069] Mon, 12 October 2015 12:34 Go to next message
Eclipse UserFriend
Dear all,
I have the following scenario.
It is possible to export data from a table in type format Microsoft Excel 97-2003 Worksheet (.xls)
I'd like to check in automatic way if data exported match with data in Application under test and I think to read the xls using Java.
Is it possible to mix java portion of code and RCPTT test case ?
If not have you got good tip to test it in automatic way using RCPTT ?

Thanks in advance guys.



[Updated on: Tue, 20 October 2015 06:01] by Moderator

Re: Is it possible to use java portion of code in RCPTT test case ? [message #1711121 is a reply to message #1711069] Tue, 13 October 2015 04:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Angelo,

You can try to use exec-process command for this purpose.

Kind regards,
Ulyana.
Re: Is it possible to use java portion of code in RCPTT test case ? [message #1711344 is a reply to message #1711121] Thu, 15 October 2015 04:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi dear Ulyana
I try to run a simple "Hello world" but probably the syntax it is not correct Rolling Eyes

below the command
exec-process -command "C:\\Prog\\Java\\jdk1.7.0_75\\bin\\java" -args "C:\\Users\\angelo.luciani\\workspace\\testhello\\bin\\testhello"


return
Execution failed, exit code: 1. Embarrassed

Please let me know.
Thanks in advance.

[Updated on: Thu, 15 October 2015 04:20] by Moderator

Re: Is it possible to use java portion of code in RCPTT test case ? [message #1711431 is a reply to message #1711344] Thu, 15 October 2015 22:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi Angelo,

I've just tried on Mac and it works for me (with executable jar file):

exec-process -command "java" -args "-jar" -args "/Users/Ulik_MacAir/Documents/HelloWorld.jar"


Could you please also try to change your path, i.e.:

"\"C:\\Prog\\Java\\jdk1.7.0_75\\bin\\java\""


Kind regards,
Ulyana.
Re: Is it possible to use java portion of code in RCPTT test case ? [message #1711451 is a reply to message #1711431] Fri, 16 October 2015 04:40 Go to previous messageGo to next message
Eclipse UserFriend
After various tentative I am able to run a test case without any errors using a jar file as Ulyana described a post before anyway in the console log regarding the AUT
C:\Users\angelo.luciani\rcpttWorkspace\.metadata\.plugins\org.eclipse.pde.core\xdm.client.rcp.xdm\console.log


I don't see the
system.out.println("Hello Word") 
that the testhello.jar file contains.

Below the command code I'm using Windows 7
exec-process -command "\"C:\\Prog\\Java\\jdk1.7.0_75\\bin\\java\"" -args "-jar" -args "\"C:\\Users\\angelo.luciani\\workspace\\testhello\\bin\\testhello.jar\""


Where I can see the system.out.println("Hello Word") printed ?

[Updated on: Fri, 16 October 2015 04:41] by Moderator

Re: Is it possible to use java portion of code in RCPTT test case ? [message #1711457 is a reply to message #1711451] Fri, 16 October 2015 05:35 Go to previous messageGo to next message
Eclipse UserFriend
Hi Angelo,

To send output to Console, please, modify the script like shown below:

{code}

exec-process -command "\"C:\\Prog\\Java\\jdk1.7.0_75\\bin\\java\"" -args "-jar" -args "\"C:\\Users\\angelo.luciani\\workspace\\testhello\\bin\\testhello.jar\""| invoke getStdout | log

{code}

After that output will be shown in RCPTT Console.

Kind regards,
Ulyana.
Re: Is it possible to use java portion of code in RCPTT test case ? [message #1711919 is a reply to message #1711457] Tue, 20 October 2015 06:00 Go to previous message
Eclipse UserFriend
It works ! I can see it in the log ! Thank you Ulyana ! You Rock !
Previous Topic:#Tool to transform get-item in global variables
Next Topic:Do you know if in RCP TT exists something like javadoc ?
Goto Forum:
  


Current Time: Sat Jun 21 17:08:07 EDT 2025

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

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

Back to the top