Page 1 of 1

Manual retrieve of DataCache

Posted: Thu Apr 14, 2011 12:57 pm
by mats
Retrieve DataCache can be done with DataSources.Get(). But only if a TestSuite is running.

How can a TestSuite DataCache be retrieved within a normal <Ranorex>.exe-Test (Without starting a TestSuite).

Reason 1: My Testsystem is not able to handle the new command line arguments (at the moment)
Reason 2: I have to retrieve the Data conditional within a Loop

Re: Manual retrieve of DataCache

Posted: Fri Apr 15, 2011 10:56 am
by Support Team
mats wrote:How can a TestSuite DataCache be retrieved within a normal <Ranorex>.exe-Test (Without starting a TestSuite).
In other words, you want to load data from a data source without using a test suite, right?

Have a look at the classes inheriting from DataConnector, like the CsvDataConnector. After you created a data connector, call its LoadData method to load all data from the connector, i.e. for the CsvDataConnector this method parses the CSV file and returns its content in form of columns and rows.

Regards,
Alex
Ranorex Team