UnitAutogen

0.10.0

PowerShell module for UnitAutogen — auto-generated tSQLt unit tests with real branch coverage for SQL Server. Installs the framework AND the in-database (SQLCLR) predicate parser, runs generation and coverage, and exports Cobertura XML, JUnit XML, and HTML reports for Azure DevOps, GitHub Actions, Jenkins, GitLab CI, and SonarQube. The single C# predicate parser runs
PowerShell module for UnitAutogen — auto-generated tSQLt unit tests with real branch coverage for SQL Server. Installs the framework AND the in-database (SQLCLR) predicate parser, runs generation and coverage, and exports Cobertura XML, JUnit XML, and HTML reports for Azure DevOps, GitHub Actions, Jenkins, GitLab CI, and SonarQube. The single C# predicate parser runs inside SQL Server (no PowerShell-side parser); installation registers it and requires sysadmin once plus 'clr enabled'=1.
Show more

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name UnitAutogen -RequiredVersion 0.10.0

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name UnitAutogen -Version 0.10.0

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(C) 2026 Munaf Ibrahim Khatri. Licensed under AGPL-3.0.

Package Details

Author(s)

  • Munaf Ibrahim Khatri

Tags

SQL SQLServer tSQLt Coverage CI-CD Cobertura JUnit AzureDevOps Testing UnitTest CodeCoverage BranchCoverage DatabaseTesting AutomatedTesting

Functions

Install-UnitAutogenDatabase Invoke-UnitAutogen Export-CoverageCoberturaXml Export-TestResultsJunitXml Export-CoverageHtmlReport

Dependencies

This module has no dependencies.

Release Notes

## v0.10.0 (beta) — 2026-06-05

Major capability + honesty release. New capabilities:

- DML EFFECT ASSERTIONS. A modifying procedure's per-table write effect is now asserted
 with EXACT row counts, measured at generation time by running the procedure under its
 own reverse-predicate seed (rolled back). Covers INSERT (VALUES and SELECT), UPDATE and
 DELETE; when the seed drives no write, the test is skipped and names the untouched table.
- DELETE and INSERT...SELECT branch coverage. The snapshot-and-replay branch assertions
 now handle a single-target DELETE and INSERT...SELECT, not just UPDATE / INSERT...VALUES.
- TABLE-VALUED PARAMETERS. A procedure with a TVP is now auto-tested: the generator builds
 and seeds a table variable of the type and passes it (such procedures were previously
 NOT_TESTABLE). The coverage instrumenter emits table parameters schema-qualified + READONLY.
- ROW-LEVEL SECURITY. SafeFakeTable now drops a SECURITY POLICY (and its predicate-function
 chain) before faking, so RLS-protected tables can be faked instead of dooming the test
 with "participates in enforced dependencies".

Honesty fixes (no false failures — every non-pass is a pass, a labelled skip, or a clear
NOT_TESTABLE):

- Error-expectation tests are no longer over-generated. A CATCH-block re-throw is no longer
 mistaken for input validation, and a parenthesis-less THROW (THROW n,'msg',state;) is now
 detected — so "must reject" / "raises error" tests fire only for genuine validation guards.
- When the generated happy / boundary / NULL inputs cannot satisfy a procedure's own
 validation, the affected tests are SkipTest-annotated with a clear reason instead of
 failing by construction.
- A FOR JSON / FOR XML result set no longer errors the row-baseline test (it cannot be
 captured via INSERT...EXEC); that single test is skipped for such procedures.

## v0.9.14 (beta) — 2026-06-04

- CATCH-with-ROLLBACK error paths skip with an exact reason; inline TVFs report a clean
 NOT_TESTABLE; SkipTest reasons containing apostrophes are quote-escaped.

## v0.9.12 (beta) — 2026-06-04

- Result-row baseline quotes JSON keys (result columns with spaces now work); functions
 declared WITH EXECUTE AS OWNER build their coverage shadow correctly.

## Earlier releases

Full release history (v0.9.11 back to v0.9.0) is in CHANGES.md and on the GitHub
Releases page: https://github.com/unitautogen/unitautogen-public-repo/releases

FileList

Version History

Version Downloads Last updated
0.11.0 6 6/6/2026
0.10.0 (current version) 9 6/5/2026
0.9.14 18 6/4/2026
0.9.12 6 6/4/2026
0.9.11 9 6/4/2026
0.9.10 9 6/4/2026
0.9.9 9 6/3/2026
0.9.2 3 6/1/2026
0.9.1 4 5/30/2026
0.9.0 6 5/29/2026
Show more