DocBook|Search
Class Reference
%UnitTest.SQLRegression
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%UnitTest] >  [SQLRegression]
Private  Storage  

class %UnitTest.SQLRegression extends %UnitTest.TestCase, %UnitTest.DSQL, %UnitTest.ODBCSQL, %UnitTest.JDBCSQL, %UnitTest.ESQL

Extends TestCase. Extend from this class to create a regression test

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
12 10


Summary

Properties
Debug SkipTest

Methods
%%OIDGet %AddToSaveSet %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IsA %IsModified
%New %NormalizeObject %ObjectModified %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %ValidateObject AssertEqualsViaMacro AssertFilesSameViaMacro
AssertNotEqualsViaMacro AssertNotTrueViaMacro AssertSkippedViaMacro AssertStatusEqualsViaMacro
AssertStatusNotOKViaMacro AssertStatusOKViaMacro AssertTrueViaMacro ExecuteSQL
FindClass LogMessage Occurs OnAfterAllTests
OnAfterEachTest OnAfterOneTest OnAfterSqlFile OnBeforeAllTests
OnBeforeEachTest OnBeforeOneTest OnBeforeSqlFile PrepareSQL
TestDynamic TestEmbedded TestJDBC TestODBC
convertSQL countCachedQuery crossVerify describe
diffData diffExpectedByStream diffPlan exeRoutine
genPlan genRoutine getColumn getData
getFromPlan getJDBCGateway getODBCDSN getODBCGateway
getSqlCode getSqlExec ltrim processDRSToStream
processDiffFile processLog processORSToStream processRStoStream
repairName rewindLine rtrim runDSQL
runESQL runJDBCSQL runODBCSQL runODBCSQLStatement
stripChar trim typeNameByType verifyName
verifyResults

Subclasses
%UnitTest.SQLDataRegression

Parameters

• parameter CORRELATIONLIST;
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.
• parameter DATACLASS;
Specifies a class, such as Sample.Person which should be correlated with the XML tag specified by DATATAG, such as <person>, in the DATAFILE.
• parameter DATAFILE;
File that contains data in XML format, such as Person.xml. If no directory name is specified by RunTest, then the current UnitTest directory is used.
• parameter DATATAG;
Specifies an XML tag in DATAFILE, such as <person>, which should be correlated to the class specified by DATACLASS, such as Sample.Person.
• parameter DISPLAYELAPSEDTIME = " executed and fetched in ";
DISPLAYELAPSEDTIME enables you to internationalize the display of elapsed time, when TIMESCALE is a positive number.
• parameter DISPLAYSECONDS = "seconds";
DISPLAYSECONDS enables you to internationalize the spelling of "seconds" in the output of elapsed time when TIMESCALE is a positive number.
• parameter DISPLAYTESTNAME = "Test ";
DISPLAYTESTNAME enables you to internationalize the display of the test name, which may be specified after the #### delimiter in the test file, when TIMESCALE is a positive number.
• parameter REFFILE = "reference.log";
Specifies a result file for comparison use
• parameter SHOWPLAN = 0;
Set SHOWPLAN=1 to dump the access plans used by each test in the test script. Use this feature when you need to verify plan stability from one release to the next, or when you want to investigate the impact of creating, dropping, or altering an index. Boolean value specifies if comparing sql plan should be executed. Reference plan must exist in REFFILE. Dynamic Sql Plan created in Dynamic SQL test only.
• parameter SQLFILE;
Comma-delimited sql filenames overrides the sql file lookup by specifying which and in which order sql script files are to be tested
• parameter TESTFILE;
Specifies the xml file running the test so it's not reloaded
• parameter TIMESCALE = 0;
The TIMESCALE parameter enables you to control whether elapsed time information is displayed for each SQL statement, and the number of significant digits used to display the time. This can be used to determine whether significant differences in elapsed time are consumed by any individual query. By default, TIMESCALE="", which will prevent elapsed time information from being displayed at the end of each SQL statement in the test. Setting DISPLAYSECONDS to 1 will display the result in seconds. Setting DISPLAYSECONDS to 10 will display elapsed time in multiples of 10 seconds. Setting TIMESCALE to 0.1 will display elapsed time to the nearest tenth second. By grouping together a set of tests that each take about the same amount of time you can automate the process of determining if any query takes "significantly" more or less time than it did previously.

Methods

• method OnAfterEachTest() as %Status
Method to clean up after each Test method is executed.
• method OnAfterSqlFile(sqlfile As %String) as %Status
Method available to do any work after a Sql File has finished execution.
• method OnBeforeEachTest() as %Status
Method to clean up before each Test method is executed.
• method OnBeforeSqlFile(sqlfile As %String) as %Status
Method available to do any work before a Sql File has begins execution.
• method TestDynamic()
Test each line of sql from sql file against Cache Dynamic SQL using %UnitTest.DSQL If no REFFILE exists, it will be created from the dynamic results and that file will serve as the correct test results. It is up to the test creator to confirm the expected test results are correct.
• method TestEmbedded()
Test each line of sql from sql file against Cache Embedded SQL using %UnitTest.ESQL
• method TestJDBC()
Test each line of sql from sql file against Cache JDBC SQL using %UnitTest.JDBCSQL
• method TestODBC()
Test each line of sql from sql file against Cache ODBC SQL using %UnitTest.ODBCSQL
• method processDiffFile(ByRef rslt As %Stream)
Method to display incorrect results in a more readable format.
• method verifyResults(ByRef src As %FileCharacterStream, testName As %String = "") as %Status
Compare dynamic results src against existing reference file