Is there any way to copy a file from Eggplant's Resources folder to the SUT's any Local Folder?

I want to copy (Transfer) a file from Eggplant’s Resources folder to the SUT machine.

I tried the below command taken from the Eggplant Documentation but it is not working.

copy file “C:/MyRepoFolder/Main.suite/Resources/TestFile.txt” to “SUT:C/Temp”

Its not recognizing the Remote machine (SUT Path) Path.

Is there any other way to achieve this?

A pretty big workaround, but you could put the file contents in the remote clipboard, then use eggplant scripting to go through the steps to create a new file on the SUT and put the contents of the clipboard in it.

2 Likes

The way I achieve this is with a git repo.
If I know a test needs a resource available on the local sut then that resource gets commited to a “sutresources” git repo.
A clone of that "sutresources repo is made on the sut.
At the beginning of every run I do a git pull to ensure the resource will be available.
Then the test can interact with that repo on the sut.
Hope that makes sense.

The file and folder commands within SenseTalk reference the client machine (i.e. the machine running Eggplant Functional) and not the SUT machine. The simplest way to move/copy files from your client machine to any other machine, SUT or not, is to make that location available as a lettered drive on the client machine. For example, you could map your S: drive to c:\temp on your SUT machine. I will say that your mention of the SUt machine makes me wonder what you will do with the file on the SUT. Knowing the answer to that might allow the forum to provide a more complete answer.