Testing / Ranorex Interview questions
How do you manage test data using CSV, Excel, or database connections in Ranorex?
Ranorex ships with built-in data connectors so a test case's input values can live outside the test itself, in whatever format the team already maintains its test data in.
- CSV connector - points at a comma-separated file; simplest option, easy to version-control alongside the test suite.
- Excel connector - reads a named sheet or range, convenient when non-programmers maintain the data.
- Database connector - an ADO.NET connection with a SQL query, useful when data already lives in a shared database and should stay in sync with it.
Once a connector is added to the Test Suite and bound to a test case's DataSource property, every column becomes available as a $variable inside that case's modules, and Ranorex automatically iterates one execution per row.
// Reading a bound row directly in a code module var row = testCase.Activity.DataContext.CurrentRow; string sku = row["SKU"].ToString(); int qty = Convert.ToInt32(row["Quantity"]);
Choosing between them mostly comes down to who owns the data and how large it is: CSV for small, developer-owned lists; Excel when testers who aren't coders need to edit rows themselves; and a database connector when the data is large, shared with other systems, or needs to reflect near-real-time state.
More Related questions...