Skip to content

Release Notes Version 1.3

KLandwich edited this page Jan 31, 2024 · 1 revision

Release Notes for SASUnit Version 1.3

System Requirements

SASUnit requires SAS. SAS is a product and registered trademark of SAS Institute, Cary, NC (http://www.sas.com).

Following are the system requirements for SASUnit, supporting different versions of SAS running on different operating systems.

Supported execution environments

  • SAS 9.2 and 9.3 (32 and 64 bit versions) 9.4 (64 bit version only)
  • SAS running on operating systems Windows 7, Windows XP and Linux
  • SAS language configuration: English and German

That does not mean that every combination and configuration has been tested, see tested environments below. SASUnit can also be used on environments not mentioned here (it has been used with SAS on various Unix systems) but we have no documented tests for those.

Execution environments fully tested

SASUnit has been fully tested in the following environments with SAS language configuration English and German. The language specified in the following list shows the operation system language setting which is relevant for some parts of SASUnit:

  • Windows 7 64bit English / SAS 9.3 64 bit
  • Windows 7 64bit English / SAS 9.3 32 bit
  • Windows 7 64bit English / SAS 9.2 32 bit
  • Windows 7 64bit German / SAS 9.3 64 bit
  • Linux Ubuntu 12.04 LTS / SAS 9.3 64 bit
  • Linux Suse 10.3 / SAS 9.2 32 bit

Further tools used for testing

  • Doxygen 1.8.2
  • Microsoft Internet Explorer 9
  • Firefox 17.0.1

Changes since version 1.2.1

Enhancements

Support for new SAS version 9.4

No support for SAS 9.1.3 anymore due to usage of HTML4

  • It is needed because we use the new inline formatting syntax, which is correctly nestable
  • HTML pages are now created via SAS ODS using HTML4-Destination. There is no need to change your SAS session settings.
  • The only HTML-Pages not created via SAS ODS are the log pages due to links for errors and warnings and the tree view html page.

There are several new assert:

  • assertForeignKey Checks whether a foreign key relationship between the columns of two data sets exists.
  • assertPrimaryKey Checks whether a set of columns can be used as primary key for the data set.
  • assertRecordCount This assert checks whether a certain number of records exist in a data set specified by parameters i_libref and i_memname.
  • assertRecordExists Check whether at least one record exists which satisfies a certain WHERE condition.
  • assertRowExpression Check whether at least one record exists which satisfies a certain WHERE condition.
  • assertTableExists Check whether a certain data set, view or catalogue exists.

Reworked assertion framework

  • New asserts no longer require changes to overall macros. Now there is a defined interface.
  • Each assert must implement the following macros:
    • assert<assertName>
      • This macro is called by the SASUnit user to validate conditions
    • _render_assert<assertName>act
      • This macro renders the actual column of the detail page for each test case. _renderDataColumn can be called in a default implememtation. See _render_assertEqualsact.sas for details
    • _render_assert<assertName>exp
      • This macro renders the expected column of the detail page fo each test case. renderDataColumn can be called in a default implememtation. See _render_assertEqualsExp.sas for details
  • Each assert may implement the following macro
    • _render_assert<assertName>rep
      • This macro renders html pages that are referenced by the corrresponding act- and exp-macros. (e.g. Comparison results for assertColumns)

Asserts now print the result of the test to the logfile.

  • This feature is available when you specify i_verbose=1 in initTestcase.
  • Each failed assert writes an error message to the logfile. It has the following Syntax:
    • ERROR(SASUNIT): <error message>
  • Each passed assert writes a NOTE to the log.
  • This message can be modified by any assert. If you don't specify a message then a default message indicating failure or success is generated.

SASUnit will generate a XML-file containing JUnit-output by default.

  • The xml file is stored in the rep folder as any other reporting result.
  • Each scenario is treated as a test suite in Junit
    • Each testcase is mapped to a Junit test case
      • Only the first failed assert per test case is mapped to a Junit failure

SASUnit example project covers all new asserts

  • There is a new scenario "Test for building a database". This scenario deals with the creation of a data base and are checking constraints after and prior joining some tables to a combined dataset It consists of two testcases
    • Basedatasets
    • Combineddataset

SASUnit ships with a DoxyGen configuration file, that is bound to DoxyGen Version 1.8.2

Several further enhancement included in release 1.3

  • Slight changes to table headers
  • Prior to execution of a scenario all created files from last execution are deleted
  • New parameter i_include and i_exclude for assertColumns
  • SASUnit utility macros now have shorter names

Solved defects

  • Adjusted check for LINUX-os
  • SASUnit now works correctly if paths contain blanks. This is true now for WINDOWS AND LINUX
  • Detection of date and time values is now more stable

Changes since version 1.2

Enhancements

There is a new option to activate test coverage reporting.

  • Using the test coverage reports it is easier to assess how much source code is covered by the test cases. Use this feature to discover which parts of a unit under test are never executed during tests. More about test coverage assessment see Patrick Warnat's paper on PhUSE 2010.
  • The macro initsasunit now offers the new option i_ testcoverage. Setting this parameter to a value of 1 activates generation of test coverage reporting. This is now the default operation mode for all command scripts in the bin folder.
  • In the SASUnit report, in the tab Units under Test, a new column ‘test coverage’ can be found, showing the calculated test coverage percentage for every unit under test. The percentage is calculated as the number of source code lines executed at least once during all tests of a unit divided by the number of all lines of the unit except non-contributing lines (e.g. empty lines or comment lines). The test coverage percentage figure is a html hyperlink targeting a colored html representation of the source code file. In this html representation, for every source code line it is shown whether the line was executed in the tests or not.
  • This feature is only supported in combination with SAS 9.3.
  • Test coverage assessment is implemented using the SAS option MCOVERAGE. Unfortunately, we discovered that the MCOVERAGE – Option is not working perfectly (SAS 9.3 TS1M2). In some cases executable source code is marked as non-contributing code. In very seldom cases, executed code is not marked as executed code. We have reported these findings to SAS Institute and they have confirmed this behavior. It is classified as an error to be corrected in the future. However, the available test coverage assessment is properly working in most cases and thus it is already good enough to be helpful.

Solved defects

  • Corrected error in displaying the status of scenarios. If an error is detected in the scenario log then the scenario is now marked as erroneous. This is currently only available on the "Test Scenarios" page. It will be integrated into the "Units under Test" page in one of the next releases.

Changes since version 1.1

Enhancements

  • This is the first release of SASUnit where project management has been fully hosted on SourceForge, so this is a starting point for faster release cycles and for better integration of the HMS development team and the user community in the future.
  • Support for different environments has been reorganized, there now is a pair of command files for each scenario, one for complete execution of the test suite and one for incremental execution of changed programs only.
  • Projects can now be moved without the need to change command files.
  • Command files now pause when there is an error or a warning.
  • Testing procedures have been improved by the means of more unit tests and a detailed test plan, also across different environments.
  • The main page now includes more information about the execution environment (SAS version, configuration, user id etc.).
  • The SASUnit logo has been changed to the green OK symbol and it now links to SourceForge.
  • There is a new assertion for performance tests (assertperformance.sas).
  • Example regression_test.sas has been enhanced for better comprehensibility (see regression.xls) and is now also available under SAS on Linux.
  • Added support for testcases that need to redirect logfiles. Macro variables g_logfile and g_printfile hold the redirected paths used by SASUnit.

Solved defects

  • Errors resulting from special characters in parameters of SASUnit macros have been fixed.
  • Missing style sheet in assertreport has been added.
  • Errors in the scenario log are now being highlighted in the scenario details report.
  • Scenarios without a valid test case are reported as well.
  • Missing test scenario programs are reported as well.
  • Problems with English settings of Microsoft Windows have been solved.
  • Column "number of test cases" on overview page for units under test wrongly showed number of checks, this has been fixed and column "number of checks" has been added.
  • Warning and error messages have been eliminated from run_all.log.
  • Fixed issue where %sysexec call to SAS for running of test scenarios failed because the call string became too long.
  • Some additional minor bugs have been solved.

Most current version

You can get the most current version of SASUnit and also the full self testing environment from the svn repository. Note that the svn head revision might not be fully tested.

Contributors

Klaus Landwich (project management, development) Anne Kirchmann (documentation) Dr. Patrick Rene Warnat (development test coverage) Johannes Lang (development) Nikolas Aggelidakis (Linux development) Bernhard Braun (testing and programming) Leonhard Rohr (programming) Oliver Thieleman (programming) Andreas Mangold (project management)


Back to [User's Guide](User's-Guide)
Clone this wiki locally