DAI - Distributed Execution - Result path

—3 related questions on the files—
1) I have the script to generate some custom log file using the log file generated by Eggplant. So I am trying to access the log file like:

set myRes to the result
If myRes is empty Then
	set Global reportFolder to folder of logfile of the last item of ScriptResults()
else
	set Global reportFolder to parent folder of myRes.LogFile
End If

Log Global reportFolder

This was worked perfect when I directly connect any machine and execute the tests from Studio. Now, I am running from DAI site using the DAI Run Agent, and always getting printed like below for the global reportFolder which I am trying to get in the above code.

{asText = ""; directory = ""; folder = ""; "long name" = ""; name = ""; objectType = fileDescription; }

2) Also, I am using all the relative path to fetch the screenshot path and others. When I looked at the folder where the DAI Run Agent is fetching latest suites from my git like:

C:\ProgramData\Eggplant\Agent\suites\{env-name}\.run\git_repo\mySuite.suite

But couldn’t find any screenshots or files under the Results folder of the suite here. So, how I can access these files?

3) Also, How I can know if the script is running using DAIRunAgent or running directly by connecting the SUT with Eggaplant Studio itself using some sensetalk script?

As you have discovered, DAI stores its results, both logs and screenshots, differently than in Eggplant Functional. If you want to access your screenshots from your file system instead of from within DAI, include the path where you want them stored as part of your CaptureScreen() command. The DAI Run Agent is a means for DAI to communicate with ePF which is the engine for your code. Any scripts triggered from within DAI will use a Run Agent. As to the question concerning the log folder, it would be helpful to understand the use case for returning that path. There may not be a precise 1:1 match for what you want in DAI compared to ePF, but instead there may be a different may to accomplish the same thing.

Like you said, I am passing the path for the CaptureScreen. The path that I am passing is the folder where the log file should be, and that’s where I am stuck now as the DAI Run Agent uses log differently, and I couldn’t get the proper results folder path.

I would like to know if it is possible to set the results folder from my script so that everything will go into that folder which I can use the way I want it or any files I need.?

So what do you want to do with the log and screen captures? They are stored in DAI so we can always extract them from there. Just wondering what you would like to do with them?

Like I said in my initial question, we are generating custom log file (no tech details) for which we were using this log file to fetch the details like each step details, screenshot names, etc.

Which version of DAI are you currently on?

It’s DAI version 7.5.0-9.