Automatic filtering of datasource
Posted: Wed Aug 09, 2017 3:26 pm
Hi,
our AUT supports several different database-systems (MS SQL Server, SQLite, even Access, you get the idea).
We are testing each functionality of our software for each possible database connection, using CSV-Connectors.
The CSV contains all information to connect to the desired data source, create the query and validate the result.
Simplified CSV example:
Since these tests take some time, we would like to be able to filter out data sources which we do not want to test at this time (for example: only test where database = "mssql").
Considering that we have about 80 test cases, each with an individual CSV-file bound to it, manual filtering using the Ranorex Databinding GUI is not an option.
Our most promising attempt was to check the current data row in a code module in the test case setup and skip it if the data source should not be tested now.
Example:
But we got stuck at this stage because the remaining number of test iterations is not updated when using the Next()-method.
Another attempt was to ignore test iterations using the conditional configuration from the databinding-dialog, but this allows only to skip a test case completely.
The easiest solution for us would be to either:
Hours of googling and getting lost in the API documentation could not solve this for us.
Maybe there is a much easier solution we simply missed out on?
Thank you very much!
Ranorex-Version: 7.1
our AUT supports several different database-systems (MS SQL Server, SQLite, even Access, you get the idea).
We are testing each functionality of our software for each possible database connection, using CSV-Connectors.
The CSV contains all information to connect to the desired data source, create the query and validate the result.
Simplified CSV example:
Code: Select all
database;query_fieldname;query_fieldvalue;expected_result
mssql;id;123456;result1
access;ID;456789;result2
sqlite;iD;abcdef;result3
Considering that we have about 80 test cases, each with an individual CSV-file bound to it, manual filtering using the Ranorex Databinding GUI is not an option.
Our most promising attempt was to check the current data row in a code module in the test case setup and skip it if the data source should not be tested now.
Example:
Code: Select all
while (TestSuite.CurrentTestContainer.DataContext.Get("database") != "mssql") {
TestSuite.CurrentTestContainer.DataContext.Next()
}
Another attempt was to ignore test iterations using the conditional configuration from the databinding-dialog, but this allows only to skip a test case completely.
The easiest solution for us would be to either:
- update the internal iteration counter, so that using Next() becomes possible,
- find and use an API-function to ignore an iteration, much like the Test Case-condition would.
Hours of googling and getting lost in the API documentation could not solve this for us.
Maybe there is a much easier solution we simply missed out on?
Thank you very much!
Ranorex-Version: 7.1