I read the jenkins blogpost and tried to setup Ranorex to work with my jenkins installation and discovered a strange problem. I created a Excel datasource and put it in a project. I am using the datasource in other projects too and so I set a relative path to the other project.
Here are the settings directly from the studio:
Here are the settings from the debug folder (generated with Ranorex)
Here are the setting from the debug folder (generated with jenkins)
The jenkins job obviously can't find the Excel file. Any ideas how to fix this issue?
Manual build is different from Ranorex build
Manual build is different from Ranorex build
Last edited by aleksv on Fri Apr 20, 2018 9:44 am, edited 1 time in total.
Re: Jenkins build is different from Ranorex build
I just found out that if I build the solution manually via CMD the same happens. Are there special parameters that are set by ranorex before the build?
Re: Jenkins build is different from Ranorex build
Hi,
I guess you are not including the data connector file in your solution? Simply include the file to solution and set its property Copy to output directory to Always. Then simply change the path to data connector file to Dataver\Config\ranorex_config.xlsx (without ..\) and you are done. From now on, Ranorex will always copy the xlsx to bin\debug|release\Dataver\Config\ranorex_config.xlsx and access the file from there. Hope this helps?
I guess you are not including the data connector file in your solution? Simply include the file to solution and set its property Copy to output directory to Always. Then simply change the path to data connector file to Dataver\Config\ranorex_config.xlsx (without ..\) and you are done. From now on, Ranorex will always copy the xlsx to bin\debug|release\Dataver\Config\ranorex_config.xlsx and access the file from there. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Jenkins build is different from Ranorex build
I already did what you suggested. The Excel file can be found in the debug folder in both cases (manual build and ranorex build) but the reference in the .rxtst-File (the one in the debug folder) is wrong.
When Ranorex builds the projects it looks like this: When I do a manual build it looks like this: As you can see the path is different and thus the file can't be found in the second case.
I forgot to add that I put the file in a folder of another project. So that's why there is a relative path.
"Copy to ouput directory" is set to "Always"
When Ranorex builds the projects it looks like this: When I do a manual build it looks like this: As you can see the path is different and thus the file can't be found in the second case.
I forgot to add that I put the file in a folder of another project. So that's why there is a relative path.
"Copy to ouput directory" is set to "Always"
Re: Jenkins build is different from Ranorex build
Is there something special about your build? Usually, if you build the solution, all included files should be always (automatically) copied to bin\debug|release folder (of course, with enabled Copy to output directory). Also, what happens if you remove ..\ from path in the data connector configuration dialog? There should be no need to use jump to above folder, if the "dataver" folder is located right in the solution folder.
Here is how I usually organize my data in solution...
Here is how I usually organize my data in solution...
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Jenkins build is different from Ranorex build
When I remove the ".." the file can't be found anymore.
Here is how I access the file from another project:

Here is how I access the file from another project:
- Attachments
-
- 2018-04-19_15h59_38.png (57.91 KiB) Viewed 748 times
Re: Jenkins build is different from Ranorex build
I found a workaround which works in Ranorex and on manual builds...
I want to access one Excel file from one project in all other projects... here is how it works:
As you can see here, in the main project I have a folder named "Config" which contains the ranorex_config.xlsx file.
Now I create the same folder in the other projects with the same content. Now I link all the datasources in the projects to their own config file.
When I am finished I delete all Config folders except the one in the main project.
Now Ranorex says it can't find the file (red dot before "File name") but it works! Now Ranorex builds and manual builds work with this setup (and of course jenkins)
I want to access one Excel file from one project in all other projects... here is how it works:
As you can see here, in the main project I have a folder named "Config" which contains the ranorex_config.xlsx file.
Now I create the same folder in the other projects with the same content. Now I link all the datasources in the projects to their own config file.
When I am finished I delete all Config folders except the one in the main project.
Now Ranorex says it can't find the file (red dot before "File name") but it works! Now Ranorex builds and manual builds work with this setup (and of course jenkins)