Test the Data Source Connector deployment

 

What do you want to do?

Establish the test execution specific requirements

Set up the test file structure

Execute the test

Establish the test execution specific requirements

On top of the default Data Source Connector installation, each execution will require a number of files to be present before the evaluation process can be started. These files are as follows:

Compiled Rulebase

These are the compiled output files, from a valid rulebase.

Source Data Files

These are a set of comma separated variable (henceforth csv) files containing data that is appropriate for, and can be mapped against, the aforementioned rulebase. The data within these files can either be sequential (Faster Execution) or non-sequential (Easier data extraction from source), but it is essential that appropriate Primary and Foreign Keys are present for Relationship Mappings.

Configuration File

This is the configuration file that specifies how the Data Source Connector should interpret and map data from the source to the rulebase, which relationships need to be traversed, which attributes need to be outputted and specific execution parameters such as the number of concurrent threads that the Data Source Connector should use during the evaluation process.

The exact details of the run to be performed are contained within the configuration file (the file is not required to have an xml extension, but it is recommended for organizational purposes). Due to the relative complexity of this file compared to previous items in the guide, key lines will be explained in detail below. The exact format in which these lines should appear in the final file can be deduced easily by examining the configuration.xml file shipped with the product and located in the data folder.

Set up the test file structure

A typical DSC file structure might be as follows:

bin

The bin folder contains the batch scripts that execute the test. It should be noted that the run_test.bat file is different to the run.bat file only in the fact that it has the configuration file to be used during the test scenario hard coded, as opposed to accepting command line arguments.

Also included in the bin folder is the .NET version of the Java application named DataSourceConnector.exe, together with its requisite runtime libraries (Oracle.Determinations.Masquerade.dll and Oracle.Determinations.Engine.dll)

conf

The conf folder contains the log4j.properties file, which specifies the output parameters of the Connector Logging Service. This file can be used to change where the logs are output to, how big each log is, and how many overflow logs are kept. The following log levels are permissible INFO, DEBUG, ERROR, and FATAL.

The conf folder also contains the example configuration file, configuration.xml.

data

The data folder contains the source CSV files used during the test scenario. By default there are six files in this directory, three CSVs and their corresponding XML description files.

lib

The library folder contains the Data Source Connector's java library, and other requisite runtime libraries. This includes a copy of the Oracle Determinations Engine Java Library.

logs

The logs folder is the default output location for the Data Source Connector log file (data-source-connector.log). This log file will contain all log messages along with the time and date they were recorded.

output

The output folder is the default location for test scenarios output files; as specified in the test's configuration file. It is important that this folder is emptied each time the test scenario is re-run. The presence of pre-existing output files will cause execution to halt.

Execute the test

The test is launched using the run_test.bat file contained within the \bin folder. It is also possible to execute the test by launching run.bat and passing it the location of the configuration.xml file as an argument, in the same way other configuration files can be utilized. Also, the .NET executable DataSourceConnector.exe could be used instead of running the batch files as it accepts the same argument as with the run.bat.

Once the test is launched, details of the run will be logged to the log folder (unless the log4j.properties file has been modified) and can be viewed by opening the data-source-connector.log file. By default this will not contain debug information, but should this be required it can be enabled either by passing a second argument -debug when executing the batch file, or by modifying the batch file to do so.

 

C:\Program Files\Oracle\Determinations\Data Source Connector\bin>run.bat ..\conf\configuration.xml -debug

C:\>run_test.bat -debug

 

Output will be in the form of csv files in the location specified in the configuration file. By default this is the \output folder.