Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » Reading csv-file from workspace
Reading csv-file from workspace [message #1694081] Thu, 30 April 2015 08:10 Go to next message
Eclipse UserFriend
Hello,

I'm trying to read entries from a csv-file in my test case. Therefore I'm using the read-csv-file command in ECL and (as suggested in the documentation http://download.eclipse.org/rcptt/release/1.5.4/doc/ecl/index.html#read-csv-file) created a workspace context within the project which contains the csv-file.

However, on replaying the test, I receive the following error message: "Cannot parse URI workspace:\Parameters\XYZ.csv at read-csv-file"

Could you please tell me what I'm doing wrong.

Kind regards,
Anand
Re: Reading csv-file from workspace [message #1694086 is a reply to message #1694081] Thu, 30 April 2015 08:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Anand,

Could you please try to use -uri "workspace:/Parameters/XYZ.csv" at read-csv-file (slash symbols instead of backslash).

Yours sincerely,
Ulyana.
Re: Reading csv-file from workspace [message #1694281 is a reply to message #1694086] Mon, 04 May 2015 03:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ulyana,

sorry this was a typing mistake from my side. In the actual test case I'm using normal slashs and it's still not working.

Kind regards,
Anand
Re: Reading csv-file from workspace [message #1694387 is a reply to message #1694281] Tue, 05 May 2015 00:00 Go to previous messageGo to next message
Eclipse UserFriend
Try to use the following snippet:
read-csv-file [uri-from-path [concat [substitute-variables "${workspace_loc}"] "/<path after workspace://>"]]


Please let me know if it helps.
Re: Reading csv-file from workspace [message #1694697 is a reply to message #1694387] Thu, 07 May 2015 04:41 Go to previous messageGo to next message
Eclipse UserFriend
Hi Olga,

unfortunately it does not help. However, as far as I understand the snippet you are trying to read the csv-file from a file system and not from the workspace context (which is not what I was looking for).

Kind regards,
Anand
Re: Reading csv-file from workspace [message #1694712 is a reply to message #1694697] Thu, 07 May 2015 06:02 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Yes, that snippet reads csv file from folder with workspace on filesystem.
This file should appear there after applying workspace context.

The preparation steps are:
1. Create workspace context and capture the application state (or add project manually)
2. Add context to Test Case
3. Add line with read-csv-file to test case
read-csv-file [uri-from-path [concat [substitute-variables "${workspace_loc}"] "/<path after workspace://>"]]

Steps during execution which are produced by RCPTT:
1. Apply Worspace context, Import project to AUT's workspace
2. Folder with files appears in workspace (uri of that folder = concat [substitute-variables "${workspace_loc}"] "/<path after workspace://>")
3. Execute test (read file from the mentioned folder)

Did you do the same steps? What error do you have with that snippet?
Could you please execute your test case, then click button report in Execution View, choose RCPTT-report format and attach report here.
Thanks in advance!
Re: Reading csv-file from workspace [message #1694717 is a reply to message #1694712] Thu, 07 May 2015 07:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi Olga,

thank you very much for your detailed response. As I see I did a mistake in the preparation steps as I had changed the state from the workspace context.

Kind regards,
Anand
Re: Reading csv-file from workspace [message #1694718 is a reply to message #1694717] Thu, 07 May 2015 07:11 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Does it work fine for you now?
Have you finally succeed to use read-csv-file?
This tutorial might be helpful for you, I think.

[Updated on: Thu, 07 May 2015 07:12] by Moderator

Re: Reading csv-file from workspace [message #1694975 is a reply to message #1694718] Mon, 11 May 2015 03:29 Go to previous message
Eclipse UserFriend
Hi Olga,

yes it works perfectly. The tutorial is very helpful!

Kind regards,
Anand
Previous Topic:Issue with substitute-variables
Next Topic:RCPTT Jenkins integration
Goto Forum:
  


Current Time: Mon Jun 16 15:10:06 EDT 2025

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

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

Back to the top