资 源 简 介
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 GLOBALSQLPATH = "java -jar /path/to/riatestintegration-0.0.1-SNAPSHOT-jar-with-dependencies.jar
/path/to/config.properties
var GLOBALSQLPROCESS = new Process(GLOBALSQLPATH, PROCESSREDIRECTCONSOLE);
function executeSql(sqlString)
{
GLOBALSQLPROCESS.writeln(sqlString);
pause(500);
return GLOBAL_SQL_PROCESS.read();
}
var amountForTrans