Skip to content

GeoProcessor / Command / CreateRegressionTestCommandFile


Overview

The CreateRegressionTestCommandFile command is used for software testing and validation of workflow processes. The command creates a command file that includes a StartRegressionTestResultsReport and multiple RunCommands commands. A starting search folder is provided and all files that match the given pattern (by convention test-*.gp) are assumed to be command files that can be run to test the software. The resulting command file is a test suite comprised of all the individual tests and can be used to verify software before release. The goal is to have all tests pass before software is released and not retain broken tests in the test repository.

The following table lists tags (annotations) that can be placed in # comments in command files to provide information for testing, for example:

Property File Formats

Comment Tag                                                  Description
#@enabled False The RunCommands command will by default run the command file that is provided. However, if the @enabled False tag is specified in a comment in the command file, RunCommands will skip the command file. This is useful to disable a test that needs additional work.
#@expectedStatus Failure
#@expectedStatus Warning
The RunCommands command ExpectedStatus parameter is by default Success. However, a different status can be specified if it is expected that a command file will result in Warning or Failure and still be a successful test. For example, if a command is obsolete and should generate a failure, the expected status can be specified as Failure and the test will pass. Another example is to test that the software properly treats a missing file as a failure.

Command Editor

The following dialog is used to edit the command and illustrates the command syntax.

CreateRegressionTestCommandFile

CreateRegressionTestCommandFile Command Editor (see full-size image)

Command Syntax

The command syntax is as follows:

CreateRegressionTestCommandFile(Parameter="Value",...)

Command Parameters

Parameter                           Description Default          
SearchFolder
required
The folder to search for regression test command files. All subfolders will also be searched. Can use ${Property}. None - must be specified.
OutputFile
required
The property file to write, as an absolute path or relative to the command file, can use ${Property}. None - must be specified.
FilenamePattern Pattern to find GeoProcessor command files, using * wildcards. test-*.gp

Examples

Troubleshooting

See Also