Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Read file in Jubula(How to read file in Jubula)
Read file in Jubula [message #1764162] Fri, 26 May 2017 08:18 Go to next message
trung nguyen is currently offline trung nguyenFriend
Messages: 23
Registered: March 2017
Junior Member
Hi,

I have a issue as below:
After I run a script file by Test Case executeExternalCommand, a log file is created. I want to use jubula to copy content in the log file and continue testing. Let me know if jubula is supported this feature and How can I do that?

Thanks
Trung.
Re: Read file in Jubula [message #1764370 is a reply to message #1764162] Mon, 29 May 2017 09:28 Go to previous messageGo to next message
Miklos Hartmann is currently offline Miklos HartmannFriend
Messages: 9
Registered: June 2016
Junior Member
Hi Trung!

I'm not sure I fully understand exactly what would you like to do, but I think the Test Case you used (executeExternalCommand) is the solution: you can write a shell script copying / modifying the log file you mentioned (if you have proper access to it), and execute it through this Test Case.

Best wishes,
Miklos
Re: Read file in Jubula [message #1764382 is a reply to message #1764370] Mon, 29 May 2017 09:57 Go to previous messageGo to next message
trung nguyen is currently offline trung nguyenFriend
Messages: 23
Registered: March 2017
Junior Member
I am sorry, Miklos. I mean I have a log file and I want to get content in the file. Do you have any way to get that?

Thanks

Re: Read file in Jubula [message #1764387 is a reply to message #1764382] Mon, 29 May 2017 10:19 Go to previous messageGo to next message
Miklos Hartmann is currently offline Miklos HartmannFriend
Messages: 9
Registered: June 2016
Junior Member
Hm, so you'd like to use data extracted from the file in your test. That's not possible directly, but there are ways to achieve something similar. The simplest would be to use the external command's return value to let Jubula know if something went wrong. This is a very limited use, but if you need only binary information (everything was OK / something went wrong), then you can use this. I don't think there's any 'official' way for more detailed information. As an ugly workaround you can write a script which returns 0 / 1 answers to questions, like "Is there an ERROR entry in the generated log file?", "Are there any ERROR entries containing the word JavaFX?", etc. Then you can call this script from Jubula and act accordingly depending on the answer(s). If you need textual information extracted from the log file then you can write a script which modifies an Excel file which is used as an External Data Source.

Best wishes,
Miklos
Re: Read file in Jubula [message #1764952 is a reply to message #1764162] Sun, 04 June 2017 21:29 Go to previous message
Milos Hroudny is currently offline Milos HroudnyFriend
Messages: 17
Registered: June 2017
Junior Member
It is not directly included in Jubula. Write an extension function.
Previous Topic:Using Jubula jars in JavaFX
Next Topic:press "Start AUT" and get '5009: AUT start failed No valid Java binary found.'
Goto Forum:
  


Current Time: Wed Sep 19 08:42:49 GMT 2018

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

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

Back to the top