You can configure certain elements of the run-time system environment in which your tests run. You can configure your environment
manually using the methods discussed in
Run-Time System Configuration, but those settings will remain in place for each subsequent set of tests run until you reconfigure the environment. The
Micro Focus Unit Testing Framework contains some more efficient methods to managing run-time settings, by using configuration files capable of configuring certain
settings when you initiate a particular test run.
The following table demonstrates the types of configuration file available:
File
|
COBOL Test Type
|
File Format
|
Extension
|
Environment variables
|
Run-time tunables
|
Portable environment file
|
Native,
.NET 8,
and
JVM COBOL
|
Text
|
.mfuenv
|
Y
|
N
|
Application configuration file
|
Native
|
Binary
|
.mfgcf
|
Y
|
Y
|
Java properties file
|
JVM COBOL
|
Text
|
.envprops
|
Y
|
N
|
- Portable environment files
- This type of file is used to maintain environment variables that are reused in a number of different test types, run on different
platforms; for example, a test case intended to run on both Windows and UNIX can use variables designed to supply platform-specific
data, via the configuration file.
- A portable environment file uses a number of pre-defined sections in which you can re-use the same variable, with different
values. When the test is compiled and run in different scenarios, the
Micro Focus Unit Testing Framework recognizes the scenario and selects the appropriate variable value. For more information on the different sections and how
to configure the contents, see
The Portable Environment File.
- This type of file is text-based, as so can be coded with any text editor. Ensure it has the same base name as the base name
of your test suite (i.e. the base name of your
.int,
.gnt,
.so, or
.mfu file), and with an extension of
.mfuenv, and then place it in the same location as your test suite to use it during the test run.
- Application configuration files
- This type of file is used in native COBOL tests, and can contain environment variables and run-time tunables.
- It must have the same base name as the base name of your test suite (i.e. the base name of your
.int,
.gnt,
.so, or
.mfu file), and an extension of
.mfgcf. Place this file in the same location as your test suite to use it during the test run.
- Use your IDE to create the application configuration file.
- Java properties files
- This type of file is used in procedural
JVM COBOL tests, and can contain environment variables.
- It must have the same base name as the base name of your test suite (i.e. the base name of your
.so, or
.mfu file), and an extension of
.envprops. Place this file in the same location as your test suite and it will be used during the test run. Create the plain-text file
with any text editor, placing each setting/value pairing on a separate line.