I am using an excel sheet to add data to form fields for my tests. My question is why Eggplant Manager keeps looking for such an excel file in this directory “C:/TestPlant/applications/em_agent/” and since it cannot find it here it fails the test.
Since I have the file added to my Git repo why on earth does it look for the same file to be added here. If anything I was hoping it will copy/cache all the files folders as it does for all intents and purposes.
Note that same script that uses this excel works fine when running the same test using EPF.
Anyone from EP help please ?
When ePM runs a test, it copies all of the Suite files into a cache folder in the C:/TestPlant/applications/em_agent/. This means that if you are using strict reference to the path for the Excel, it will not find it unless the file sits outside the Suite itself, and the ePM process has access to the share that houses the Excel. Yes, I know that this will mean your repo won’t contain the Excel file. Alternatively, you could put the Excel in the Resources folder within the Suite and use the ResourcePath() function. The script will work equally well within ePF and ePM, but again, this will break your repo as the Excel in the cache will be out of sync (more current) with the copy in the Resources folder in the repo. Here are the options that I presented to one of my clients who had the same problem:
Option 1: Change ePM to use a local file location instead of checking out scripts from your repo. Write a script to copy file from the cache location to the Resources folder in the local file location. Manually sync the local file location with your repo immediately before and after the script runs in ePM.
Option2: Option 1 with the addition of a second script to trigger GitHub Desktop (or similar tool) to sync local file structure with your repo before and after the scheduled run in ePM.
Option 3: Add git -bash script to your your master script to git transfer file from cache to repo. This would require that Git be installed on the ePM server.
Option 3: Change myConnectionString in the script to update a file on SharePoint instead of an Excel within the Resources folder.
Option 4: Create a sendmail script to email a copy of the Excel on completion. This is the option that my client chose, but they were willing to swap in a new Excel for each scheduled run.
Eggplant Technical Services might do a better job of explaining this, but at its core, the repo functionality within ePM was intended to allow you to check out files, but it was not intended to allow you to check in files.
Sorry that I don’t have a better solution for you.
Many thanks Dave for your help.