wrong excel file being opened

Ask general questions here.
martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

wrong excel file being opened

Post by martinsw » Wed Apr 11, 2012 12:03 pm

Hi,

I am using an excel file to data drive the tests in my automation. A step to open the excel file (a "run application" action) and make some selections is included in my automation. Once i've finished working on my automation i build it (with the build configuration set to "release") and then copy the compiled files (the input .xlsx file, the .exe file, the .config file and the .rxst file) into a folder on the server.

However, when I then run the automation from the server using the compiled files, it is the excel file in my solution (located on my local drive) and not the compiled file on the server that is being opened and manipulated. This is not what I want to happen, it is the excel file on the server that should be opened and not the one in my solution. I would have assumed that the the test runner would just open the excel file from the same folder from which it is being run but this isn't what's happening.

Currently, for the "run application" step, only the excel file name is specified. I am aware that I can probably get round this problem by specify the full path of the excel file to the location of the excel file on the server. However, doing it this way means that I have to change the path each time I do a new build (as each new build has its own folder on our server).

Is there a more practical solution to this problem?

Thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: wrong excel file being opened

Post by Support Team » Thu Apr 12, 2012 9:24 am

Hi,
martinsw wrote:Currently, for the "run application" step, only the excel file name is specified. I am aware that I can probably get round this problem by specify the full path of the excel file to the location of the excel file on the server. However, doing it this way means that I have to change the path each time I do a new build (as each new build has its own folder on our server).
Do you use the DataConnectors of Ranorex to iterate through your Excel file or do you have your own module to iterate through this file? If you use the Ranorex mechanic, did you check the "Include to Test Suite" when you've created your Excel DataConnector?

What do you mean the app should take the server excel file. Is this on a place which you want to access or do you copy the file to the output folder of your test?

Regards,
Peter
Ranorex Team
.
Image

martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

Re: wrong excel file being opened

Post by martinsw » Thu Apr 12, 2012 3:09 pm

Hi Peter,

Here's the situation. I have Ranorex Studio installed on my machine and I create and build my automation from here.

My tests are data driven from an excel file that resides within the test suite folder. When I release a build of the automation to our server I perform the following steps:

(1) Click on the build menu within Ranorex Studio
(2) Set the configuration to "Release"
(3) Click on "Build Solution"
(4) Building the solution for release results in four files being created in the "Release" folder within the "Bin" folder
- the data input sheet (.xlsx)
- the .exe file
- the .config file
- the .rxtst file.

(5) I then copy these four files to the server an place them in the relevant build folder so that the automation can then be run from our run time machine (which resides on the same network but only has the Ranorex test runner installed).

The automation is then executed on the run time machine using the files that were copied to the server.

Hopes this makes sense so far...

The first step the automation performs when it is kicked off is to open the .xlsx file on the server (using the run application action), make some selections and then save and close the file. When the automation is executed from the run time machine there is no issue, the correct excel file is opened, changed and saved and the automation runs successfully.

However, sometimes I need to run the built automation from my own machine. When I do this though, it is the .xlsx file within my local test suite folder that gets opened and changed and not the one on the server. I would like to know if there is a way that I can get the automation to open the correct file without having to specify the full path of the file. Specifying the full file path would mean that I would have to update the file path each time I do a new build as each build is kept in its own folder.

Hope this explains my situation a little clearer.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: wrong excel file being opened

Post by Support Team » Mon Apr 16, 2012 3:49 pm

Hi Martin,

I already try to reproduce your issue with the information you send us, but you already know this. :)

Regards,
Peter
Ranorex Team
.
Image