Command Line Tool - TestRun
Introduction
Section titled “Introduction”Run tSQLt tests against a target database context.
Enlight testRun --connectionString=<sqlConnectionString> [--filter=<wildcardPattern>] [--class=<testClassName>] [--singleTest=<testName>] [--reportFormat=<format>] [--reportOutput=<outputPath>] [--verbosity=<level>] [--nologo] [--timeout=<seconds>]Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
| class | Run a single tSQLt test class (schema name), e.g. [CustomerTests]. |
| singleTest | Run a single test, e.g. [CustomerTests].[test something]. |
| filter | Include tests matching wildcard pattern, e.g. *Customer*. |
| reportFormat | (Default: Json) Valid values: None, Json, JUnit, VSTest. |
| reportOutput | Output file or directory for json/junit reports. |
| verbosity | (Default: Normal) Output verbosity level. Valid values: Quiet, Normal, Detail, Verbose. |
| nologo | (Default: true) Do not show header and copyright info. |
| connectionString | Required. SQL connection string for the target context database. |
| timeout | (Default: 300) SQL command timeout in seconds. |
Examples
Section titled “Examples”Run tests in tSqlt_Examples database with test filter:
Enlight testRun --connectionString="Server=.;Database=tSqlt_Examples;Integrated Security=True;" --filter=*Customer* --timeout=600 --verbosity=NormalRun tests in tSqlt_Examples database with test class filter:
Enlight testRun --class=[CustomerTests] --connectionString="Server=.;Database=tSqlt_Examples;Integrated Security=True;" --filter=*Customer* --timeout=600 --verbosity=NormalRun tests in tSqlt_Examples database with single test filter:
Enlight testRun --connectionString="Server=.;Database=tSqlt_Examples;Integrated Security=True;" --singleTest="[CustomerTests].[test something]" --timeout=600 --verbosity=Normal