Data source error in Team City while Running Ranorex Script

Best practices, code snippets for common functionality, examples, and guidelines.
ravihraj
Posts: 6
Joined: Fri Aug 26, 2016 4:48 pm

Data source error in Team City while Running Ranorex Script

Post by ravihraj » Wed Oct 05, 2016 10:31 pm

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)
Attachments
Datasourceissue.png
Datasourceissue.png (128.25 KiB) Viewed 631 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Thu Oct 06, 2016 1:33 pm

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ravihraj
Posts: 6
Joined: Fri Aug 26, 2016 4:48 pm

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

Post by ravihraj » Thu Oct 06, 2016 5:16 pm

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Thu Oct 06, 2016 5:40 pm

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration