AbstractTest

Schema Diagram

TOP

Description

An AbstractTest is an abstract representation of a test object. No AbstractTest is actually ever instantiated; instead, you refer to an instance of a TestCase or a TestSuite or a TestScenario, each of which inherits all of the characteristics of an AbstractTest. The AbstractTest specifies the following information:

Element Status Purpose
name Required A short phrase or title identifying the test.
description Required A sentence or paragraph describing what the test does.
testFileRootPath Optional Any string representing a path in which subsequently listed test files and result files will be found. If not supplied, this defaults to the canonical path to the test file defining this test.
propertyFileRootPath Optional Any string representing a path in which listed property files will be found. If not supplied, this defaults to the canonical path to the test file defining this test.
agency Optional This element designates the agency that is called upon to provide an individual operative that is responsible for carrying out this test. If present, this entry must include the following sub-elements:
    - className Required This entry must be the fully qualified name of a class that implements one public static method with the following signature:

public static IOperative operative(List<String> argumentList);

This method takes a single java.util.List parameter that is populated with zero or more instances of java.lang.String; the list can be used by the class to pre-configure either itself or the operative, which is then returned to the caller. This method must return an instance of a class which implements the blitz.main.IOperative interface.

    - argument Optional, Repeatable Each occurrence of this element results in a single string that is added to the list of arguments that is passed to the named class via the operative() method.
matcher Optional This element designates a matcher that can be used by the operative for comparing the content of an "actual result file" with the content of an "expected result file". If present, this entry must include the following sub-elements:
    - className Required This entry must be the fully qualified name of a class that implements the blitz.main.IMatcher interface. (Unless overridden, this value is automatically inherited by all test cases and/or test suites that are nested within the current test suite.)
    - argument Optional, Repeatable Each occurrence of this element results in a single string that is added to a list of arguments that is passed to the named class through its constructor method; that is, the implementing class must have a constructor of the form:

public MyMatcher(List<String> argumentList);

    - filter Optional Designates a filter to be used by the matcher. The filter typically is used to process the contents of the actual and expected result files before any comparison is made. If present, this element must include the following sub-elements:
        = className Required This entry must be the fully qualified name of a class that implements the blitz.main.IFilter interface.
        = argument Optional, Repeatable Each occurrence of this element results in a single string that is added to a list of arguments that is passed to the named class through its constructor method; that is, the implementing class must have a constructor of the form:

public MyFilter(List<String> argumentList);

property Optional A property definition, specified as a combination of occurrences of either a single key-value pair, or a file containing multiple key-value pairs. If present, this element requires the declaration of at least one of the following sub-element choices:
    - file   The name of a property file that specifies all or part of the run-time environment for the test. If the name of the file is not an absolute reference, then the file is expected to be located somewhere in relation to the propertyFileRootPath, or "." if none is supplied.
    - Key-value pair   if present, this sub-group must include the sub-sub-elements:
        = key   A non-empty string representing the unique name of the property.
        = value   A non-empty string representing the value that is to be associated with the key.

NOTE: The ordering of property files and/or key-value pairs is important, because they are read into a test-centric property sheet in the same order that they are encountered in the XML file. Any individual property (either defined in a file or specified as a key-value pair) automatically overrides a previously defined property with the same key name.

TOP