Working directory and location of results¶
The notion of a working directory is particularly important in rTest.
ScenarioPlayer and test scenarios are designed to use absolute or relative paths. The use of relative paths in scripts is recommended because it makes it easier to move projects to different environments (development, test, acceptance, pre-production) or different operating systems.
The working directory is the directory containing the scenario xml file. When a relative path is used in the test scenario or in a scenarioPlayer.fmw parameter, the working directory is used as a reference.
Result storage directory or target directory¶
scenarioPlayer.fmw generates several documents that are stored in three subdirectories of the target directory.
The location of the target directory is defined according to the following rules:
If the Result Directory parameter (userdestdir) is left empty, the working directory is used as the hive.
If the Result Directory parameter (userdestdir) contains a valid absolute path, this path is used as the target directory. The corresponding directory is created if it does not exist.
If the Result Directory (userdestdir) parameter contains a valid relative path, the location of the target directory is evaluated with respect to the working directory, i.e. the location of the scenario. The corresponding directory is created if it does not exist.
If the syntax used to define the hive is not correct, processing is terminated with an error.
Location of the script file¶
The scenarioxml parameter can be defined either absolutely or relative to the working directory existing at the time of launching fme.exe. Be careful, this directory is usually different from the working directory used by scenarioPlayer.fmw. The working directory therefore changes when FME is launched with scenarioPlayer.fmw. If the processing finishes correctly, the working directory is reset to its initial position.
Results of a control¶
Running scenarioPlayer.fmw produces 4 types of results in 3 separate directories:
2 reports in html format in ./rtreport (the time-stamped version of the report for archiving and its copy lastReport.html for consultation)
0 or 1 control file in json format in ./rtcontrol
0 to n FME process log files in ./rtlog
1 scenarioPlayer.fmw log file in ./rtlog
It should be noted that the generation of the HTML reports and the control file is controlled by the output parameter of scenarioPlayer. The control file is mainly used for debugging purposes and is not usually generated in the production phase.
Definition: Each execution of scenarioPlayer produces a report in HTML format providing a readable summary of the main information of the control: name of the scenario, date of the control and status of each of the tests carried out, links to the log files... To facilitate consultation, each report is automatically duplicated under the name lastReport.html when it is created.
Naming: The report has the name of the scenario file, a timestamp suffix, and the extension ".html", for example HelloWorld_1631122315071.html.
Location: Reports are stored in ./rtreport/
Definition: The raw result in JSON format contains all the information about the last check performed.
Naming: It has the name of the scenario file, a timestamp suffix and the extension "".json", for example HelloWorld_1631122315891.json.
Location: Control files are stored in ./rtcontrol/
Definition: Each rtest/processCollection/process element in the scenario corresponds to an FME process whose execution generates a log file listed in the report and control file.
Naming: The file has the FME project name corresponding to the process and a suffix consisting of: "_" + date in milliseconds + ".log" For example: IGNFAttributeAlticoder_1618127989805.log for the process IGNFAttributeAlticoder.fmw
Location: Log files are stored in ./rtlog/
Log of scenarioPlayer¶
Definition: The log file for each scenarioPlayer run is also kept.
Naming: The file name is composed of the concatenation:
of the base name of the scenario file, for example: IGNFAttributeAlticoder,
a suffix corresponding to the execution time in milliseconds,
for example: sp_IGNFAttributeAlticoder_1618127989806.log for the process IGNFAttributeAlticoder.fmw
Location: Log files are stored in ./rtlog/