SASUnit Examples  Version 1.5.0
File List
Here is a list of all documented files with brief descriptions:
o*_abspath.sasCheck whether &i_path is absolute or empty. If not, append to &i_root
o*_assertlibrary.sasMain routine of assertLibrary
o*_asserts.sasCalled by assert macros, fills table tst
o*_checklog.sasCheck log for errors or warnings
o*_checkscenario.sasDetermine whether a test scenario has to be executed
o*_closehtmlpage.sasThis macro is part of the HTML speedup solution and "closes" an open HTML page
o*linux/_copydir.sasCopy a complete directory tree. Uses Windows XCOPY or Unix cp
o*unix_aix/_copydir.sasCopy a complete directory tree. Uses Windows XCOPY or Unix cp
o*windows/_copydir.sasCopy a complete directory tree. Uses Windows XCOPY or Unix cp
o*_copyfile.sasCopy file byte by byte
o*_createtestsubfolder.sasCreates test subfolders
o*_crossreference.sasThe macro allows to gather cross reference information between different macros. A calling hierarchy is established for the directories found in the test database in columns tsu_sasautos1 to tsu_sasautos9. If i_includeSASUnit is set to 1 the directories in tsu_sasunit, tsu_sasunit_os and tsu_sasautos are included as well in the scan. Libref target has to be set
o*_deletescenariofiles.sasDeletes all appendant files in the log, tst and rep folders. Called before a scenario is being executed in order to avoid disused files
o*_delfile.sasDelete an external file if it exists
o*_deltempfiles.sasDelete all SAS datasets in the form WORK.DATAxxx, see tempFileName.sas
o*_dependency.sasThe macro creates two .json files for every macro in the autocall libraries. Based on these .json files the visualization of the call hierarchy is achieved using the D3.js library. The macro takes two data sets (listcalling and dir) created by the macro _crossreference.sas as input
o*_dependency_agg.sasAggregate JSON files to one JavaScript file containing one JSON object
o*_dependency_wr.sasThe macro is called from _dependencyJsonBuilder. It iterates through the dependency tree and writes out a .json file to visualize the call hierarchy
o*_detectsymbols.sasDetermine the language dependant symbols used for NOTE, ERROR, WARNING in the SAS log
o*linux/_dir.sasGenerates a dataset with the names of all files in a directory or directory tree. Wildcards may be used to specify the files to be included
o*unix_aix/_dir.sasGenerates a dataset with the names of all files in a directory or directory tree. Wildcards may be used to specify the files to be included
o*windows/_dir.sasGenerates a dataset with the names of all files in a directory or directory tree. Wildcards may be used to specify the files to be included
o*_doc.sasThis is the readme file for version 1.2 of SASUnit, the Unit testing framework for SAS(R) programs, copyright 2010, 2012 HMS Analytical Software GmbH, http://www.analytical-software.de
o*_doxygroups.sasNo source code - only file grouping for Doxygen
o*linux/_escapeblanks.sasEscapes blanks with backslashes if runnign under linux or aix
o*unix_aix/_escapeblanks.sasEscapes blanks with backslashes if runnign under linux or aix
o*windows/_escapeblanks.sasEscapes blanks with backslashes if runnign under linux or aix
o*linux/_executecmdfile.sasExecute an command file by operation system command
o*unix_aix/_executecmdfile.sasExecute an command file by operation system command
o*windows/_executecmdfile.sasExecute an command file by operation system command
o*_existdir.sasCheck whether a directory exists
o*_existvar.sasDetermines whether a certain variable, optionally of a certain type, exists in a SAS dataset
o*_getabspathcomponents.sasOf a given absolute file path (with / as dir separator), extract the file name and the path to the file (without file name) Example: The absolute path C:/temp/test.sas splitted into the two strings C:/temp and test.sas
o*_getautocallnumber.sasLook for a specific program in all of the autocall libraries and return the number of the library (0..10) or . if not found.
For autocall library numbering see initsasunit.sas
o*_getextension.sasGet file extension including the separating dot
o*_getpgmdesc.sasRetrieve program description from Doxygen brief tag
o*_getscenariotestid.sasDetermine the test case id
o*_gettestsubfolder.sasDetermines and returns the path for test subfolders
o*_handleerror.sasCheck for errors and set status code and messages
o*_initerrorhandler.sasInitialize error handling, see _handleError.sas
o*_loadenvironment.sasInitialize runtime environment (macro symbols and librefs / / filerefs)
o*linux/_mkdir.sasCreate a directory, if it does not exist The containing directory must exist
o*unix_aix/_mkdir.sasCreate a directory, if it does not exist The containing directory must exist
o*windows/_mkdir.sasCreate a directory, if it does not exist The containing directory must exist
o*_nls.sasMacro symbols for national language support
o*_nobs.sasReturns number of observations in a SAS dataset
o*_opendummyhtmlpage.sasThis macro is part of the HTML speedup solution and "closes" an open HTML page
o*linux/_oscmds.sasSet global macro variables for OS commands
o*unix_aix/_oscmds.sasSet global macro variables for OS commands
o*windows/_oscmds.sasSet global macro variables for OS commands
o*linux/_preparetextfiles.sasCorrects termstring in textfiles. Under Linux CRLF will be converted to CR
o*unix_aix/_preparetextfiles.sasCorrects termstring in textfiles. Under Linux CRLF will be converted to CR
o*windows/_preparetextfiles.sasCorrects termstring in textfiles. Under Linux CRLF will be converted to CR
o*_render_assertcolumnsact.sasRenders the layout of the actual column for assertColumns
o*_render_assertcolumnsexp.sasRenders the layout of the expected column for assertColumns
o*_render_assertcolumnsrep.sasCreate reports for assertColumns
o*_render_assertequalsact.sasRenders the layout of the actual column for assertEquals
o*_render_assertequalsexp.sasRenders the layout of the expected column for assertEquals
o*_render_assertforeignkeyact.sasRenders the layout of the actual column for assertForeignKey
o*_render_assertforeignkeyexp.sasRenders the layout of the expected column for assertForeignKey
o*_render_assertforeignkeyrep.sasCreate HTML pages for assertForeignKey
o*_render_assertlibraryact.sasRenders the layout of the actual column for assertLibrary
o*_render_assertlibraryexp.sasRenders the layout of the expected column for assertLibrary
o*_render_assertlibraryrep.sasCreate HTML pages for assertLibrary
o*_render_assertlogact.sasRenders the layout of the actual column for assertLog
o*_render_assertlogexp.sasRenders the layout of the expected column for assertLog
o*_render_assertlogmsgact.sasRenders the layout of the actual column for assertLogMsg
o*_render_assertlogmsgexp.sasRenders the layout of the expected column for assertLogMsg
o*_render_assertperformanceact.sasRenders the layout of the actual column for assertPerformance
o*_render_assertperformanceexp.sasRenders the layout of the expected column for assertPerformance
o*_render_assertprimarykeyact.sasRenders the layout of the actual column for assertPrimaryKey
o*_render_assertprimarykeyexp.sasRenders the layout of the expected column for assertPrimaryKey
o*_render_assertprimarykeyrep.sasCreate HTML pages for assertPrimaryKey
o*_render_assertrecordcountact.sasRenders the layout of the actual column for assertRecordCount
o*_render_assertrecordcountexp.sasRenders the layout of the expected column for assertRecordCount
o*_render_assertrecordexistsact.sasRenders the layout of the actual column for assertRecordExists
o*_render_assertrecordexistsexp.sasRenders the layout of the expected column for assertRecordExists
o*_render_assertreportact.sasRenders the layout of the actual column for assertReport
o*_render_assertreportexp.sasRenders the layout of the expected column for assertReport
o*_render_assertreportrep.sasCopy reports for assertReport and create frame page for comparison where necessary (if two reports have been specified)
o*_render_assertrowexpressionact.sasRenders the layout of the actual column for _render_assertRowExpression
o*_render_assertrowexpressionexp.sasRenders the layout of the expected column for assertRowExpression
o*_render_assertrowexpressionrep.sasCreate HTML pages for assertRowExpression
o*_render_asserttableexistsact.sasRenders the layout of the actual column for assertTableExists
o*_render_asserttableexistsexp.sasRenders the layout of the expected column for assertTableExists
o*_render_crossrefcolumn.sas
o*_render_datacolumn.sasRenders the layout of a generic data column
o*_render_iconcolumn.sasRenders the layout of the icon column
o*_render_idcolumn.sasRenders the layout of any id column
o*_reportautonhtml.sasCreate a list of units under test for HTML report
o*_reportcashtml.sasCreate a list of test cases for HTML report
o*_reportcreatestyle.sasCreates to style used while rendering ODS output
o*_reportcreatetagset.sasCreates tageset used with ODS for generating JUnit-XML output
o*_reportdetailhtml.sasCreate page with detail information of a test case in HTML format
o*_reportfooter.sasCreate footer area of an page for reporting
o*_reportfooterhtml.sasCreate footer area of an HTML page for reporting
o*_reportframehtml.sasCreate frame page for HTML report
o*_reportheaderhtml.sasCreate HTML header for a page in the HTML report
o*_reporthomehtml.sasCreate home page of HTML report
o*_reportjunitxml.sasCreation of XML-based test report according to the JUnit-Sepcification
o*_reportloghtml.sasConvert log-File into HTML page
o*_reportpagetophtml.sasCreate HTML header, tabs and title of an HTML page
o*_reportpgmdoc.sas
o*_reportpgmheader.sas
o*_reportscnhtml.sasCreate list of test scenarios for HTML report
o*_reporttabshtml.sasCreate tabs on HTML page for report
o*_reporttcghtml.sasProcesses the output of the MCOVERAGE and MCOVERAGELOC system options available in SAS 9.3 in order to assess test coverage.
A html representation of a given macro source code file is generated, showing which lines of code were executed during tests
o*_reporttreehtml.sasCreate the table of contents on the left side of the HTML report as a tree
o*linux/_runprogramspawned.sasRuns a program in a spawned process
o*unix_aix/_runprogramspawned.sasRuns a program in a spawned process
o*windows/_runprogramspawned.sasRuns a program in a spawned process
o*_scanheader.sas
o*_scenario.sasInitialize a test scenario, see initSASUnit.sas. _scenario.sas is used to initialize the SAS session spawned by runSASUnit.sas
o*_stdpath.sasStandardizes a path makes it relative to a root path
o*_tempfilename.sasCreates a unique name for a temporary dataset in the form WORK.DATAxxx, where xxx is a consecutive integer
o*_termscenario.sasClose the last test case at the end of a test scenario
o*_timestamp.sasReturn a formatted timestamp string from a specified datetime value or from the current time
o*linux/_xcmd.sasRun an operation system command
o*unix_aix/_xcmd.sasRun an operation system command
o*windows/_xcmd.sasRun an operation system command
o*assertcolumns.sasCheck whether there are differences between the values of the columns of two sas data sets (PROC COMPARE)
o*assertequals.sasCheck whether there are differences between the value of a macro variable and an expected value
o*assertforeignkey.sasChecks whether a foreign key relationship between the columns of two data sets exists
o*assertlibrary.sasCheck whether all files are identical in the libraries i_expected and i_actual
o*assertlog.sasCheck whether errors or warnings appear in the log
o*assertlogmsg.sasCheck whether a certain message appears in the log
o*assertperformance.sasCheck whether runtime of the testcase is below or equal a given limit
o*assertprimarykey.sasChecks whether a set of columns can be used as primary key for the data set
o*assertrecordcount.sasThis assert checks whether a certain number of records exist in a data set specified by parameters i_libref and i_memname
o*assertrecordexists.sasCheck whether at least one record exists which satisfies a certain WHERE condition
o*assertreport.sasCheck whether a report file exists and was created during the current SAS session
o*assertrowexpression.sasChecks if all observations meet a given WHERE expression
o*asserttableexists.sasCheck whether a certain data set, view or catalogue exists
o*basedatasets.sasCreate base datasets for a database
o*boxplot.sasCreate boxplot for two groups
o*boxplot_test.sasTests for boxplot.sas
o*combineddataset.sasCreate combined dataset for a database
o*database_test.sasTests for buidling a database
o*doxygroups.sasNo source code - only file grouping for Doxygen
o*endtestcall.sasEnds an invocation of a program under test
o*endtestcase.sasEnds a test case
o*generate.sasPartition a SAS dataset by groups, one data set per group
o*generate_test.sasTests for generate.sas
o*getvars.sasReturn variable names for a SAS dataset
o*getvars_test.sasTests for getvars.sas
o*initsasunit.sasInitialization of a test suite that may comprise several test scenarios
o*inittestcase.sasStart of a new test case that comprises an invocation of a program under test and one or more assertions
o*nobs.sasReturn number of observations in a SAS dataset
o*nobs_test.sasTests for nobs.sas - has to fail!
o*regression.sasLinear regression analysis - example for SASUnit
o*regression_test.sasTests for regression.sas
o*report_de.sasCreate german report in separate subfolder
o*reportsasunit.sasCreation of a test report
o*run_all.sasRun all test scenarios for SASUnit example project
\*runsasunit.sasInvokes one or more test scenarios