Page 1 of 1

Data connectors

Posted: Wed Oct 03, 2012 2:07 pm
by monkey2012
If I organize my test suite as below:

MyTestSuite - Test Suite
|-- TC_TestCase1 DataConnector1
|--Recording_1 Bound variable: 1
|--Recording_2 Bound variable: 4
|--Recording_3 Bound variable: 3
|--[teardown]
|--Recording_Cleanup Bound variable: 2

Can I have a separate data connector (*.xls or Simple Data Table) for only the "Recording_Cleanup in Teardown region?

Re: Data connectors

Posted: Thu Oct 04, 2012 1:57 pm
by Support Team
Hello,

Unfortunately it is not possible to add more than one data connector for each test case, but you can load an excel file manually within the UserCode. Please read the forum post Read from multiple Excel sources in one test case. Ciege explained how to access the data in an excel file.

Regards,
Bernhard
Ranorex Support Team

Re: Data connectors

Posted: Fri Oct 05, 2012 1:56 am
by IanF
I have been having a play with this data thing. Atteched is a small project file "Example" It's one I downloaded from here and modified.

There are 2 tests VIP_DB & VIP_DB_II, the first starts the app and loads data for the second.

XLWrapper.cs is the Excel data handling file it is a conversion of the stuff I used in my QTP days. Credit for the conversion goes to one of Dev's here. It is not without its bugs but it works in the context of this example.

You can use the methods from XLWrapper.cs in coded modules or in recorded modules via add user code.

Note the path of this project on my machine is "C:\Ranorex_Project_FS"

When you run the Tests the data will be written to the project data file (First & Last Name) this will then be used by the second test.

You can use methods from XLWrapper.cs to write captured values at runtime for use in tests down the line.

This is not presented as solution it is presented as an idea for discussion.
Example.zip

Re: Data connectors

Posted: Wed Oct 10, 2012 4:27 pm
by monkey2012
Thanks