Rule-based SUTs

I would like for Eggplant Manager to choose from a pool of SUTs at runtime to select a SUT that is not currently in use. To put it another way, I would like for the SUT to be chosen automatically much like the option for Agents. Would creating a rule-based SUT meet that need if I had multiple SUTs that shared the same property? Has anyone had success with a rule-based SUT created for this purpose?



You can try using configurations, which allow you to include a list of SUTs for the test to run against. If you check the “run with best effort” option in the configuration, the test will try to use the SUTs and pass on any that are not accessible.

Hi Ken,
This worked as documented if not exactly as hoped. We are trying to run the test once on whatever is the first available SUT. When I add three SUTs to the Configuration, even with “Run with best effort” selected, ePM attempts to run the test three times.
Unfortunately, running a test against a Configuration introduced an unanticipated error: the folder structure is now out of sync. Prior to the test with Configurations, the folder number was the same at both levels in ePM. Example: C:/TestPlant/cache/em_agent/TRS/13552/instances/13552/suites/FBS.suite/Results/VeniceSmartsheetsUpdate/20210517_123029.082/LogFile.txt
Now the numbers are out of sync:
This might otherwise not cause an issue, but a portion of our script uses File Explorer on the SUT to navigate to the Resources path on the Agent, and that code expected the folder numbers to be the same. I have now changed the code with the expectation that they can be different. Is there any way to bring those folder numbers back in sync with one another?

Dave the folder numbers are rarely in sync with one another. If you’re reading the script log in your test for some reason your might want to use something like the following to retrieve the log file:

log the logfile of the last item of scriptresults()

Using logic like this should avoid the issue you’re running into.

Hi Ken,
The situation that we are working with is as follows:

  • A non-Eggplant batch process generates an Excel file and saves it to a shared drive.
  • An Eggplant process running via Manager needs to read information from and write information to that file.
  • The Excel file needs to be archived to a location on a shared drive after the previous step is complete.

Our current workflow is this:

  • The non-Eggplant batch process writes the file to a shared drive.
  • The ePM test begins by launching Windows File Explorer, navigating to the share, copying the file, navigating to the Resources folder for that run on the Agent machine, and pasting the file.
  • Data is read from and written to the file in the Resources folder.
  • Eggplant launches Windows File Explorer, navigates to the same Resources folder, cuts the file, navigates to an Archive folder, and pastes the file.

Because Eggplant doesn’t work with UNC addresses and because ePM struggles with finding mapped drives, we are using File Explorer to move files back and forth. As such, we need the folder numbers within TRS to pass to File Explorer. If there is a better workflow than the one that we are using, we would be appreciative to try it.


I’m not understanding what the TRS folders have to do with a network share. But if you need to get to these folders and files you should be using the scriptresults and resourcepath functions rather than jumping through all of those hoops you mentioned.

Hi Ken,

We use both the scriptresults and resourcepath functions within our scripts, but neither of those functions produces a path that we can type into Windows File Explorer on the SUT that will navigate to the Resources folder on the Agent. Once the file is moved via Windows File Explorer, resourcepath works as expected, but the dilemma is how best to move the file into the resources folder at runtime.