Page 1 of 1

Data source error in Team City while Running Ranorex Script

Posted: Wed Oct 05, 2016 10:31 pm
by ravihraj
Hi team,

I am facing the below error when I try to run the sanity test script in team city.

Step 2/2: Execute MEDM Testcases (Command Line) (1s)

[16:19:59][Step 2/2] Starting: D:\BuildAgentSvc2\BuildAgent\work\69e2327a3d6db026\SCM\RanorexUITests\MEDM\bin\Debug\MEDM.exe /tc:TC_01_VerifyLogin

[16:19:59][Step 2/2] in directory: D:\BuildAgentSvc2\BuildAgent\work\69e2327a3d6db026

[16:19:59][Step 2/2] [2016/10/05 16:19:59.280][Debug ][Logger]: Console logger starting.

[16:19:59][Step 2/2] [2016/10/05 16:19:59.370][Failure][TestSuite]: The Excel file with name 'TestData.xlsx' could not be found.

[16:19:59][Step 2/2] [2016/10/05 16:19:59.399][Debug ][Logger]: Console logger stopping.

[16:19:59][Step 2/2] Process exited with code -1

[16:19:59][Step 2/2] Step Execute MEDM Testcases (Command Line) failed


In my local server, I have create test case for that data source I have configured through excel sheet. ( Excel sheet is with in project folder and it is mapped for the test case)

Re: Data source error in Team City while Running Ranorex Script

Posted: Thu Oct 06, 2016 1:33 pm
by odklizec
Hi,

Since you already enabled copying of data file to output directory (via data file properties dialog), there is no need to enable also "Copy File to Project" in Manage Data Sources dialog. Just uncheck this option and then add DataTables folder in front of TestData.xlsx. So the whole path in Data Sources manager should look like this:

Code: Select all

DataTables\TestData.xlsx 
Hope this helps?

Re: Data source error in Team City while Running Ranorex Script

Posted: Thu Oct 06, 2016 5:16 pm
by ravihraj
Thanks Team for the quick reply. I did all the steps which was suggested. But still I am facing the issue.

[10:26:15][Step 2/2] Starting: D:\BuildAgentSvc2\BuildAgent\work\69e2327a3d6db026\SCM\RanorexUITests\MEDM\bin\Debug\MEDM.exe /tc:TC_01_VerifyLogin

[10:26:15][Step 2/2] in directory: D:\BuildAgentSvc2\BuildAgent\work\69e2327a3d6db026

[10:26:16][Step 2/2] [2016/10/06 10:26:16.163][Debug ][Logger]: Console logger starting.

[10:26:16][Step 2/2] [2016/10/06 10:26:16.304][Failure][TestSuite]: The Excel file with name 'DataTables\TestData.xlsx' could not be found.

[10:26:16][Step 2/2] [2016/10/06 10:26:16.328][Debug ][Logger]: Console logger stopping.

Re: Data source error in Team City while Running Ranorex Script

Posted: Thu Oct 06, 2016 5:40 pm
by odklizec
Hi,

I guess the problem is in the second step, which somehow redirects the working directory to D:\BuildAgentSvc2\BuildAgent\work\69e2327a3d6db026? Do you have an idea why and what this step really does? Because in my opinion, the starting directory should be in D:\BuildAgentSvc2\BuildAgent\work\69e2327a3d6db026\SCM\RanorexUITests\MEDM\bin\Debug where I'm sure you will find also the DataTables dir with mentioned excel file.