IRISLIB database
SQLRegression Class Reference

Extends TestCase. More...

Inheritance diagram for SQLRegression:
Collaboration diagram for SQLRegression:

Public Member Functions

_.Library.Status OnAfterEachTest ()
 Method to clean up after each Test method is executed.
 
_.Library.Status OnAfterSqlFile (_.Library.String sqlfile)
 Method available to do any work after a Sql File has finished execution.
 
_.Library.Status OnBeforeEachTest ()
 Method to clean up before each Test method is executed.
 
_.Library.Status OnBeforeSqlFile (_.Library.String sqlfile)
 Method available to do any work before a Sql File begins execution.
 
 TestDynamic ()
 Test each line of SQL from <parameter>SQLFILE</parameter> using dynamic SQL. More...
 
 TestEmbedded ()
 Test each line of SQL from <parameter>SQLFILE</parameter> using embedded SQL.
 
 TestJDBC ()
 Test each line of SQL from <parameter>SQLFILE</parameter> using a JDBC SQL Gateway connection.
 
 TestODBC ()
 Test each line of SQL from <parameter>SQLFILE</parameter> using an ODBC SQL Gateway connection. More...
 
 processDiffFile (_.Library.Stream rslt)
 Method to display incorrect results in a more readable format.
 
_.Library.Status verifyResults (_.Library.FileCharacterStream src, _.Library.String testName)
 Compare dynamic results src against existing reference file.
 
- Public Member Functions inherited from TestCase
_.Library.Boolean AssertEqualsViaMacro (autoquoted, value1, value2, description)
 Returns true if two values are equal. More...
 
_.Library.Boolean AssertFailureViaMacro (message)
 Unconditionally log a failure. More...
 
_.Library.Boolean AssertFilesSQLUnorderedSameViaMacro (autoquoted, file1, file2, description, ignoreOrderBy, skipPlan, noheader)
 Returns true if two files containing SQL query results contain the same unordered results. More...
 
_.Library.Boolean AssertFilesSameViaMacro (autoquoted, file1, file2, description)
 Returns true if two files are identical. More...
 
_.Library.Boolean AssertNotEqualsViaMacro (autoquoted, value1, value2, description)
 Returns true if expressions are not equal. More...
 
_.Library.Boolean AssertNotTrueViaMacro (autoquoted, value, description)
 Returns true if the expression is not true. More...
 
_.Library.Boolean AssertSkippedViaMacro (message)
 An assertion to state that the test has been skipped for the reason described in the assertion's message. More...
 
_.Library.Boolean AssertStatusEqualsViaMacro (autoquoted, value1, value2, description)
 Returns true if two statuses are equal. More...
 
_.Library.Boolean AssertStatusNotOKViaMacro (autoquoted, status, description)
 Returns true if the status code is not a successful status code. More...
 
_.Library.Boolean AssertStatusOKViaMacro (autoquoted, status, description)
 Returns true if the status code is $$$OK. More...
 
_.Library.Boolean AssertSuccessViaMacro (message)
 Unconditionally log success. More...
 
_.Library.Boolean AssertTrueViaMacro (autoquoted, value, description)
 Returns true if expression is true. More...
 
 Checkout (file1, file2, forceref)
 Helper method that will check out the one file in Perforce and copy the output to the reference file. More...
 
 LogMessage (message)
 Enter a message in quotes, such as "Start of test". More...
 
_.Library.Status OnAfterAllTests ()
 Run by RunTest once after all test methods in the test class are run. More...
 
_.Library.Status OnAfterOneTest (_.Library.String testname)
 Run by RunTest immediately after each test method in the test class is run. More...
 
_.Library.Status OnBeforeAllTests ()
 Run by RunTest once before any test methods in the test class are run. More...
 
_.Library.Status OnBeforeOneTest (_.Library.String testname)
 Run by RunTest immediately before each test method in the test class is run. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Static Public Attributes

 DISPLAYELAPSEDTIME = None
 Extends TestCase. More...
 
 DISPLAYSECONDS = None
 <PARAMETER>DISPLAYSECONDS</PARAMETER> enables you to internationalize the spelling of "seconds" in More...
 
 DISPLAYTESTNAME = None
 <PARAMETER>DISPLAYTESTNAME</PARAMETER> enables you to internationalize the display of the test name, More...
 
 REFFILE = None
 Specifies a result file for comparison use.
 
 SHOWPLAN = None
 Set <PARAMETER>SHOWPLAN</PARAMETER>=1 to dump the access plans used by each test in the test script. More...
 
 SQLFILE = None
 Comma-delimited sql filenames overrides the sql file lookup by specifying which and in which order sql script files are to be tested.
 
 TESTFILE = None
 Specifies the xml file running the test so it's not reloaded.
 
 TIMESCALE = None
 The <PARAMETER>TIMESCALE</PARAMETER> parameter enables you to control whether elapsed time information. More...
 
- Static Public Attributes inherited from TestCase
 AutoGiveUsersNSAccess = None
 Extend this class to create new test case classes. More...
 
 AutoUserNames = None
 String of test users. More...
 
 AutoUserResources = None
 Optional: specifies resources for each test user in AutoUserNames. More...
 
 AutoUserRoles = None
 Optional: specifies roles for each test user in AutoUserNames. More...
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Additional Inherited Members

- Public Attributes inherited from TestCase
 AutoPassword
 If UnitTest.Manager creates test users specified by AutoUserNames, it will generate a random-string password. More...
 
 Debug
 Use the /debug flag with UnitTest.Manager.RunTest to break into debug mode on the first failure. More...
 
 SkipTest
 The SkipTest property gets set when a test is being skipped. More...
 

Detailed Description

Extends TestCase.

Extend from this class to create a regression test

Member Function Documentation

◆ TestDynamic()

TestDynamic ( )

Test each line of SQL from <parameter>SQLFILE</parameter> using dynamic SQL.

If no <parameter>REFFILE</parameter> 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 that the expected test results are correct.

◆ TestODBC()

TestODBC ( )

Test each line of SQL from <parameter>SQLFILE</parameter> using an ODBC SQL Gateway connection.

Requires the existence of the User namespace DSN provided with InterSystems IRIS.

Member Data Documentation

◆ DISPLAYELAPSEDTIME

DISPLAYELAPSEDTIME = None
static

Extends TestCase.

Extend from this class to create a regression test

<PARAMETER>DISPLAYELAPSEDTIME</PARAMETER> enables you to internationalize the display of elapsed time,

when <PARAMETER>TIMESCALE</PARAMETER> is a positive number.

◆ DISPLAYSECONDS

DISPLAYSECONDS = None
static

<PARAMETER>DISPLAYSECONDS</PARAMETER> enables you to internationalize the spelling of "seconds" in

the output of elapsed time when <PARAMETER>TIMESCALE</PARAMETER> is a positive number.

◆ DISPLAYTESTNAME

DISPLAYTESTNAME = None
static

<PARAMETER>DISPLAYTESTNAME</PARAMETER> enables you to internationalize the display of the test name,

which may be specified after the #### delimiter in the test file, when <PARAMETER>TIMESCALE</PARAMETER> is a positive number.

◆ SHOWPLAN

SHOWPLAN = None
static

Set <PARAMETER>SHOWPLAN</PARAMETER>=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.

◆ TIMESCALE

TIMESCALE = None
static

The <PARAMETER>TIMESCALE</PARAMETER> 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.