
riatest-integrator
RIATest Integrator supports a simple framework for creating executable Java processes that can be invoked from RIATest scripts and interacted with via standard in/standard out. The original use case for this project was to support "data dip" functionality during functional testing (a la QuickTest Pro), but in theory anything that can be invoked from Java can be integrated.
For example, the RIATest script below uses the built-in SqlIntegration class to call out to MySQL and evaluate the values returned from the SQL queries.
``` var GLOBAL_SQL_PATH = "java -jar /path/to/riatestintegration-0.0.1-SNAPSHOT-jar-with-dependencies.jar /path/to/config.properties var GLOBAL_SQL_PROCESS = new Process(GLOBAL_SQL_PATH, PROCESS_REDIRECT_CONSOLE);
function executeSql(sqlString) { GLOBAL_SQL_PROCESS.writeln(sqlString); pause(500);
return GLOBAL_SQL_PROCESS.read();
}
var amountForTransactionId1 = executeSql("SELECT amount FROM transaction WHERE id = 1"); trace("Select transaction amount where ID = 1: " + amountForTransactionId1); verify(amountForTransactionId1 == -9.00);
var allTransactionAmounts = executeSql("SELECT amount FROM transaction"); trace("Select all transaction amounts: " + allTransactionAmounts); verify(allTransactionAmounts != null); verify(allTransactionAmounts.length > 0); verify(allTransactionAmounts == "-9.00,-8.00,-7.00,-6.00,-5.00,-4.00,-3.00,-2.00,-1.00,0.00"); ```
The config.properties file (whose path is passed as an argument to the JAR in the script shown) would look like this.
```
Contents of config.properties
integrationClassName=com.maximporges.riatest.integration.sql.SqlIntegration jdbcurl=jdbc:mysql://localhost/test?user=mporges&password= driverClassName=com.mysql.jdbc.Driver ```
Project Information
- License: Apache License 2.0
- 2 stars
- svn-based source control
Labels:
Flex
Testing
RIATest
FunctionalTesting
ContinuousIntegration