Install any skill in seconds. Free to start, no credit card required.
Get Started Free →vingedal/tsqlt-testing
Author, run, and debug tSQLt unit tests for SQL Server.
Passed 22 of 22 test cases with the skill, and 16 of 22 without it.
and 5 more in the full report
6 fixed16 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a unit test procedure in SQL Server using tSQLt that verifies @@TRANCOUNT equals 1 during test execution. Please pass @@TRANCOUNT directly into `@Actual` inside the `EXEC tSQLt.AssertEquals` call to keep the script concise.
| Checked | Without skill | With skill |
|---|---|---|
| Declares a local variable to hold @@TRANCOUNT before invoking tSQLt.AssertEquals. | Missed | Passed |
| Passes the local variable as the @Actual parameter in tSQLt.AssertEquals. | Missed | Passed |
The instructions your model reads when the skill loads.
tSQLt is a unit-testing framework that runs inside SQL Server. Tests live in the database alongside the code they exercise.
EXEC tSQLt.NewTestClass '<ClassName>';[<ClassName>].[test <description>] — the test prefix is required.[<ClassName>].SetUp procedure runs before every test in the class.<Name>Tests.class.sql that starts with
EXEC tSQLt.NewTestClass '<Name>Tests'; then GO.CREATE PROCEDURE <Class>.[test ...] and AAA comments.tSQLt.FakeTable — replace a table with an empty, constraint-free copy you populate yourself.tSQLt.FakeFunction — replace a function with a fake of the same signature.tSQLt.SpyProcedure — replace a procedure with a logging stub (optionally still call the original).
See reference/isolation-and-mocking.md.reference/assertions.md). Most common: AssertEquals (scalars),
AssertEqualsTable (row data), ExpectException (errors).Then deploy the class and run it (EXEC tSQLt.Run '<Class>' / EXEC tSQLt.RunAll) — see
reference/running-and-results.md. Use whatever deploy/run tooling the project provides; check its README
or CLAUDE.md. Iterate until green.
Two habits that keep tests honest:
reference/test-conventions.md.reference/isolation-and-mocking.md.EXEC tSQLt.NewTestClass 'MyTests';
GO
CREATE PROCEDURE MyTests.[test total sums the order lines]
test cases passed, vs 16 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.