This is a brief article to summarise some recent developments relating to my ‘Math Function Unit Testing design pattern’.
Further to an article I posted in October 2021, Unit Testing, Scenarios and Categories: The SCAN Method, I have updated two unit testing utility packages to integrate the category set concept explored there.
The Powershell utility, Write-UT_Template, has also been extended to generate a template scenario for each scenario listed in a new CSV input file. In addition, the Powershell package has new functions for automation of the unit testing steps both for scripting languages and for Oracle PL/SQL.
Experience with the SCAN method has led to two extensions that simplify its application:
- Introduction of a new visualisation, the Category Structure Diagram, for example:
- (Mostly) 1-1 mapping between categories and scenarios
The project README files have also been reworked, in particular with updating of the Usage sections to centre around the three main steps in the design pattern.
These changes can be seen in the two projects above, and have also been applied in the Oracle projects:
Here is the background section from the first of the latter two projects:
I explained the concepts for the unit testing design pattern in relation specifically to database testing in a presentation at the Oracle User Group Ireland Conference in March 2018:
Powershell Trapit Unit Testing Utilities Module
Also in 2021 I developed a systematic approach to the selection of unit test scenarios:
Unit Testing, Scenarios and Categories: The SCAN Method
This module is a prerequisite for the unit testing parts of these other Oracle GitHub modules:
Utils – Oracle PL/SQL General Utilities Module
Log_Set – Oracle PL/SQL Logging Module
Timer_Set – Oracle PL/SQL Code Timing Module
Net_Pipe – Oracle PL/SQL Network Analysis Module
Examples of its use in testing four demo PL/SQL APIs can be seen here:
Oracle PL/SQL API Demos – demonstrating instrumentation and logging, code timing and unit testing of Oracle PL/SQL APIs