Skip to main content

%UnitTest.SQLDataRegression

Class %UnitTest.SQLDataRegression Extends %UnitTest.SQLRegression [ System = 4 ]

Extend this class to create a regression test when .data files are used to load data into tables.

Parameters

CORRELATIONLIST

Parameter CORRELATIONLIST As STRING;

List that correlates XML tags in a data file with classes. Tag/class entries are in the form tag:class, tag1:class1, tag2:class2. Each entry is like setting the DATATAG and DATACLASS parameters, but the CORRELATIONLIST sets several tag/class pairs in one parameter. If CORRELATIONLIST, DATACLASS, and DATATAG are all specified, the DATATAG and DATACLASS pair are added to the end of the CORRELATIONLIST.

DATACLASS

Parameter DATACLASS As STRING;

Specifies a class, such as Sample.Person, which should be correlated with the XML tag specified by DATATAG, such as , in the DATAFILE.

Sample.Person is part of https://github.com/intersystems/Samples-Data. See Downloading Samples.

DATAFILE

Parameter DATAFILE As STRING;

File that contains data in XML format, such as Person.data. If no directory name is specified by RunTest, then the current UnitTest directory is used.

DATATAG

Parameter DATATAG As STRING;

Specifies an XML tag in DATAFILE, such as , which should be correlated to the class specified by DATACLASS, such as Sample.Person.

Methods

reloadDATA

Method reloadDATA() As %Status [ CodeMode = generator ]

Method that handles the reloading of data from the DATAFILE for each Test method in SQLRegression

OnBeforeEachTest

Method OnBeforeEachTest() As %Status