Run test failed. Reason: Failed to download scripts to Controller
Version: LRE2020 SP1 (On perm)
Issue: When a test set is mapped to same script multiple times, script download failure occurs randomly with below error in event logs (Run test failed. Reason: Failed to download scripts to Controller)
Root cause from my analysis: For each test, Controller will download the scripts in a folder as zip file and extract them. If the test set is mapped to same script twice, there are chances that those scripts get downloaded in same folder and file name conflict occurs with below error message.This is random failure and happens only if the scripts with same name end up in a same folder
Error message from controller logs:
ERROR HP.PC.Activation.Activities.AsyncActivity - Failed to execute activity Download Scripts [Context: 7a861f2f-9acf-4008-9ba8-d62acd21c5b3] [FullContext: BackendUrl:http://localhost:5876 UserName:XXXX Domain:XXX Project:XXX QCRunId:62 TimeslotId:1634]
HP.PC.LT.Model.Exceptions.ScriptDownloadingException: Downloading script 10_extractionFieldComparison failed ---> System.IO.IOException: The file 'C:\LRE_Controller\scripts\637309385733699505\10_extractionFieldComparison\10_extractionFieldComparison.prm' already exists.
In the above scenario, we mapped "10_extractionFieldComparison" script 2 times in a test set and both scripts got downloaded in same folder (637309385733699505) in controller.
Workaround that we are using: Create a script copy with different name and map to the test set.
Please let me know if there is a permanent fix or settings that allows controller to handle this issue.