Unable to find csv files after closing and opening solution

Bug reports.
User avatar
Gunner1980
Posts: 89
Joined: Mon Apr 05, 2010 8:44 pm
Location: Austin, Texas

Unable to find csv files after closing and opening solution

Post by Gunner1980 » Wed Apr 06, 2011 5:04 pm

So the whole data source thing doesn't seem to be working properly in my opinion. I have tried several different options now and have not yet been able to keep my solution working after saving it and reloading it.

I am choosing to use existing csv files as I already have them to carry over from my 2.3.8 projects and because I want my users to be able to changes some of the values in the files if need be.

I add the csv file and choose the options to use the header and to include file in test suite. I notice that it is referencing the absolute path as you can see in the below screenshot. Can someone tell me what the green box in include file in test suite means? If I click on it it goes away and I can only check or uncheck it. Does it server another purpose?

Image


I open the csv file I want to use, click apply then ok. I then go through my data bindings on my recordings and bind the variables. I then notice that the absolute path is no longer being used to reference the csv file but the relative path which I thought was ok since I had the include file in test suite check box checked and because the file was in the root directory of my test case.

I then save my solution and reopen it and all of my data bindings can no longer be found. I figured out why this wasn't working. When I add a csv file to a project the GUI is copying the file to the project level while Ranorex is always looking for it at the solution level. For some reason this error doesn't show up until I reload the solution in Ranorex.

http://i185.photobucket.com/albums/x298 ... vepath.png
Image


Then if I go into Manage Data sources to see what is going on. I try to add another csv file to see if I can get it to work and I get the worlds most useless error message that tells me the following:

Image

It doesn't tell me which csv file it can't find which is a real bummer if I have 10 of them.


How can I make my test suites work again with csv files? Also is there a way to specify a different folder for csv files to be copied under? I would like to create a directory called datafiles and keep all csv files in that folder as I have 20 to 30 csv files for some test projects. Putting them all in the root directory is very cluttered.

User avatar
Gunner1980
Posts: 89
Joined: Mon Apr 05, 2010 8:44 pm
Location: Austin, Texas

Re: Unable to find csv files after closing and opening solution

Post by Gunner1980 » Wed Apr 06, 2011 10:30 pm

Ok thought I had this figured out but now all of a sudden if I have a file referenced for a csv file and it is using a relative path i.e. "csvfile.csv" but when I go to look at the values in the file via the manage data source tab it gives me an error that it can't find it on the P:/ drive. I haven't even ever used anything off of a P drive. Ummm Help?

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

Re: Unable to find csv files after closing and opening solution

Post by Support Team » Thu Apr 07, 2011 1:28 pm

Hi,

I tried to reproduce this issue, but I was not able. Of course I got this dialog too, but only if I delete the file from the Project tree or file system. With your description, you provided us, it is working as expected.
I agree that the error message is not the best and the file name should be in there, also a configurable folder to store/order such files is a good idea, because the project tree gets messy if there are 50 files under the test suite file. I will add these two items too to your bug tracking system.
Back to the error message again, have you checked if all files available and none is missing?
Would it be maybe possible to send us a sample project with the same behavior?

The blue check-box means, that the file is only copied to the test suite, if the connector with the corresponding file is used in a test case.

Regards,
Peter
Ranorex Team
.
Image

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

Re: Unable to find csv files after closing and opening solution

Post by Support Team » Fri Apr 08, 2011 1:18 pm

Hello,
The blue/green check-box means, that the file is only copied to the test suite, if the connector with the corresponding file is used in a test case.
That is the reason of your problem. If you didn't use the data source it was not copied.
The full path stayed there. When you moved the solution to another machine,
the absolute path was not available any more. I've reproduced this.

To work around this please take care to always select "Include File in TestSuite".

Regards,
Roland
Ranorex Support Team
.
Image

User avatar
Gunner1980
Posts: 89
Joined: Mon Apr 05, 2010 8:44 pm
Location: Austin, Texas

Re: Unable to find csv files after closing and opening solution

Post by Gunner1980 » Mon Apr 11, 2011 4:48 pm

This is not the work around as I showed you in our telecom, I am still fighting with this bug. I am checking to include the file in the project. The file is getting copied to the folder where the rxtst file is located however it appears that it is always looking for the csv file a the solution level. I have tried manually changing the file path in the rxtst file and this seems to work but I am unable to make any changes through the GUI after I have done this. The location where the csv files are being copied to needs to be editable and it needs to update the code in the rxtst file when it is changed.

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

Re: Unable to find csv files after closing and opening solution

Post by Support Team » Tue Apr 12, 2011 9:53 am

Hi,

maybe following link will help you solving your issue:
http://www.ranorex.com/forum/csv-file-n ... html#p8327

Regards,
Tobias
Support Team
.
Image

User avatar
Gunner1980
Posts: 89
Joined: Mon Apr 05, 2010 8:44 pm
Location: Austin, Texas

Re: Unable to find csv files after closing and opening solution

Post by Gunner1980 » Wed Apr 13, 2011 4:03 pm

Support Team wrote:Hi,

maybe following link will help you solving your issue:
http://www.ranorex.com/forum/csv-file-n ... html#p8327

Regards,
Tobias
Support Team

That is not the same issue, the issue I am having is because I have multiple test suites within one solution. The test suite is always looking at the solution level for the csv file by default. If Ranorex is going to have an option to auto copy the file it should also look for that copied file in the proper location, not assume it is always at the solution level. The work around for me has been to handjam every single csv files location so instead of looking for:

csvfile.csv (which is what ranorex automatically populates as the location of the csv file in the test suite)

it looks for

projectname/csvfile.csv

Which is where Ranorex auto copies the csv files when the check box is checked.

this is a bug with having multiple test suites within one solution.

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

Re: Unable to find csv files after closing and opening solution

Post by Support Team » Thu Apr 14, 2011 12:59 pm

Hi,

I was able to reproduce it and I will file a bug for this issue.

Regards,
Peter
Ranorex Team
.
Image