tSQLt.Edge
0.9.9
See the version list below for details.
dotnet add package tSQLt.Edge --version 0.9.9
NuGet\Install-Package tSQLt.Edge -Version 0.9.9
<PackageReference Include="tSQLt.Edge" Version="0.9.9" />
<PackageVersion Include="tSQLt.Edge" Version="0.9.9" />
<PackageReference Include="tSQLt.Edge" />
paket add tSQLt.Edge --version 0.9.9
#r "nuget: tSQLt.Edge, 0.9.9"
#:package tSQLt.Edge@0.9.9
#addin nuget:?package=tSQLt.Edge&version=0.9.9
#tool nuget:?package=tSQLt.Edge&version=0.9.9
tSQLt-edge
tSQLt-compatible unit testing framework for SQL Server 2019 and 2022. It is available as a nuget package and works perfectly with MSBuild.SDK.SqlProj project format.
Description
This project was created in order to practice code writing in TDD. Here are some detailed principles I was followed:
- Use modern Sql150 syntax
- Do not use CLR code
- Use CONCAT or CONCAT_WS instead of adding strings (+)
- Use STRING_AGG instead of concatenate strings with FOR XML PATH
- Use tSQLt assertions in internal tests
Compatibility
tSQLt-edge is mostly fully compatible with tSQLt unit testing framework. See full user guide for more details about tSQLt.
The default method of calling tSQLt.NewTestClass to create a tSQLt test class (the schema to organize your unit tests) does not work either in Visual Studio database projects nor MSBuild.SDK.SqlProj projects. That is why tSQLt-edge entirely drop support for NewTestClass, DropClass and RenameClass.
| Status | |
|---|---|
| Fully compatible | |
| Large or partial support | |
| Unsupported |
Test creation and execution:
Assertions:
Expectations:
Isolating dependencies:
Extentions
tSQLt-edge has some additional features:
| Stored procedure | Description |
|---|---|
| ApplyIndex | Same as ApplyConstraint, but for INDEXES |
| AssertEqualsTable | Add XML column comparison using convertion to NVARCHAR(MAX) |
| AssertNotEqualsString | Same as AssertNotEquals, but for NVARCHAR(MAX) |
| FakeTable | Add @NotNulls optional parameter to preserve NOT NULLs |
| SpyProcedure | Add @CatchExecutionTimes optional parameter to catch execution times in _SpyProcedureLog |
tSQLt-edge can operate on different database, same server:
| Stored procedure with external objects support |
|---|
| ApplyConstraint |
| ApplyIndex |
| ApplyTrigger |
| AssertEmptyTable |
| AssertEqualsTable |
| AssertEqualsTableSchema |
| AssertObjectDoesNotExists |
| AssertObjectExists |
| FakeFunction |
| FakeTable |
| RemoveObject |
| RemoveObjectIfExists |
| SpyProcedure |
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 529 | 12/1/2025 |
| 1.0.0 | 473 | 8/27/2025 |
| 0.9.9 | 472 | 3/13/2025 |
| 0.9.8 | 391 | 9/19/2024 |
| 0.9.7 | 463 | 4/18/2024 |
| 0.9.6 | 696 | 12/20/2023 |
| 0.9.5 | 1,024 | 2/28/2023 |
| 0.9.4 | 520 | 2/28/2023 |
| 0.9.3 | 782 | 12/11/2022 |
| 0.9.2 | 649 | 11/26/2022 |
| 0.9.1 | 695 | 11/11/2022 |
| 0.9.0 | 774 | 8/26/2022 |
| 0.8.4 | 1,314 | 7/14/2022 |
| 0.8.3 | 776 | 7/6/2022 |
| 0.8.2 | 806 | 6/29/2022 |
| 0.8.1 | 768 | 6/27/2022 |
| 0.8.0 | 805 | 6/6/2022 |
| 0.7.5 | 773 | 5/30/2022 |
| 0.7.4 | 842 | 5/7/2022 |
| 0.7.3 | 760 | 4/29/2022 |