Skip to main content



      Home
Home » Eclipse Projects » RCP Testing Tool » What is ECL command to access AUT workspace?
What is ECL command to access AUT workspace? [message #1703282] Thu, 30 July 2015 05:30 Go to next message
Eclipse UserFriend
Hi,

I am working on Folder Context option of RCPTT and trying to copy contents (files and directories) inside my testpath, so that I can use a relative path from ECL to access those files which are used in test.

In case of having a relative path, folder context provides two options:
1. home://<folder_name> - copies into my home (example: /usr2/c_jrex)
2. workspace://<folder_name> - copies into AUT workspace (example: /usr2/c_jrex/TestPlan/aut-QSIP-2)
Using my ECL script to access this directory, I have two options:
a. get-java-property "user.home" points to my home (example: /usr2/c_jrex)
b. get-java-property "user.dir" points to my AUT executable directory (example: /usr2/c_jrex/TestPlan/QSIP)
As these are the two properties which Java provides us (https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html)
Hence, you can see that 1. and a. are compatible. I can copy it to home or have a relative path to home. I am able to do it. But during CI using Jenkins, I am not sure if we have a complete directory path to access path from home.
But 2. and b. are parallel directors which doesn't know the name of each other. Hence it is hard to map each other using this. 2. just copies essential files and directories into our AUT workspace.

My question is, is there an ECL script to access AUT workspace (/usr2/c_jrex/TestPlan/aut-QSIP-2). I think there must be one, because Folder Context option workspace://<folder_name> is able to do it. Kindly let me know in the earliest.

Thank you
Jeevan

[Updated on: Thu, 30 July 2015 05:31] by Moderator

Re: What is ECL command to access AUT workspace? [message #1703287 is a reply to message #1703282] Thu, 30 July 2015 06:32 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

It is possible to use aut workspace uri in ECL, take a look at the following commands:
write-csv-file -table [get-view "Error Log" | get-tree | get-table-data] -uri "workspace:/AAA/f.csv"
read-csv-file -uri "workspace:/AAA/f.csv"

Is it exactly what you need? Please let me know if you have any questions.
Re: What is ECL command to access AUT workspace? [message #1703588 is a reply to message #1703287] Mon, 03 August 2015 08:30 Go to previous messageGo to next message
Eclipse UserFriend
Hi Olga,

Let us consider this situation, where I need to open a file in file editor and check if the content of the opened file shown in GUI is same as what is present actually.
let [val fileloc "workspace:/essentials/sample.txt"]	{
	get-file -uri $fileloc | get exists	//passing
	set-dialog-result File $fileloc //instead of absolute path, it gives "workspace:/essentials/sample.txt"
	get-menu "File/Open File..." | click //error - due to bug in AUT, it does not throw error and goes next line, no file is oppened. 
	let [val fileinfo [read-lines -uri $fileloc | str]]	{ // Failed to read /essentials/sample.txt
		get-editor "sample.txt" | get-text-viewer | get-property text | equals $fileinfo | verify-true
	}
	with [get-editor "sample.txt"] {
    get-text-viewer | set-caret-pos 2 1
    close
	}
}

Here I face a number of issues as I have commented earlier.

I have a Folder context to copy sample.text into essentials directory using
workspace://essentials

option in Folder context

The file is also copied properly as you can see here:
vl-c-jrex-ice{571}> pwd
/prj/iceng/qsip1/workspaces/c_jrex/TestPlan/aut-QSIP-2
vl-c-jrex-ice{572}> ls
essentials/  logs/
vl-c-jrex-ice{573}> ls essentials/
sample.txt  workspace_for_test/
vl-c-jrex-ice{574}> 

I have also attached screenshot of Folder Context.

Can you please guide me in this ECL? I need a way to access workspace in the form of an absolute path, when printed.

Thank you
Jeevan

[Updated on: Tue, 04 August 2015 08:13] by Moderator

Re: What is ECL command to access AUT workspace? [message #1704272 is a reply to message #1703588] Mon, 10 August 2015 01:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

We have the issue in progress.
It seems that this command is exactly what you need, please correct me if I'm wrong.
We expect this feature to be available in 2.1.0 release in the end of September.
I'll notify you when command read-file is available.
Re: What is ECL command to access AUT workspace? [message #1704727 is a reply to message #1704272] Mon, 10 August 2015 04:32 Go to previous message
Eclipse UserFriend
Hi,

I found a command which so far works fine.
[concat [get-workspace-location | str] "/essentials/sample.txt"]

Thank you
Jeevan
Previous Topic:Test multiple Eclipse instance
Next Topic:Problem launching AUT: FrameworkEvent ERROR
Goto Forum:
  


Current Time: Fri Jun 20 22:41:44 EDT 2025

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

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

Back to the top