Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 876 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 876 Bytes

Tests

Unit tests via tSQLt and Pester, code coverage by SQLCover and linting by TSQLLint and super-linter.

How it works

tSQLt unit tests

Each stored procedure has all of its tSQLt unit tests stored in a single sql script in the \tests\ folder and uses the naming convention of sp_name.Tests.sql. These should mostly adhere to the following naming conventions:

  • [sp_name].[test sp fails ...]
  • [sp_name].[test sp succeeds ...]

Pester tests

All of a stored proc's unit tests are run by a single corresponding Pester script, similarly named sp_name.Tests.ps1, which:

  • Installs the corresponding stored procedure's tSQLt tests
  • Runs all unit tests for the stored procedure as a single Pester invocation