< Back

Invoke-DevartDatabaseTests

Mon Jan 13, 2020 7:05 pm

NAME Invoke-DevartDatabaseTests



SYNOPSIS

Run tSQLt tests for specified database.





SYNTAX

Invoke-DevartDatabaseTests -InputObject <object> [-Class <string>] [-DataGeneratorProject <string>] [-FilterPath

<string>] [-IncludeTestData <SwitchParameter>] [-InstalltSQLtFramework <SwitchParameter>] [-OutReportFileName

<string>] [-QueryBatchTimeout <int>] [-ReportFormat {JUnit | MsTest}] [-RewriteReport <SwitchParameter>]

[-SynchronizationOptions <string>] [-TemporaryDatabaseServer <object>] [-UnInstalltSQLtFramework

<SwitchParameter>] [-UnitTests <string>] [<CommonParameters>]





DESCRIPTION

Returns false if the tests are filed; otherwise true.





PARAMETERS

-InputObject <object>

Database to run the tSQLt tests on. It can be a scripts folder, a NuGet package, or a database connection.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-InstalltSQLtFramework <SwitchParameter>

Install tSQLt Framework before executing tests.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-UnInstalltSQLtFramework <SwitchParameter>

Uninstall tSQLt Framework after execution of tests.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-RewriteReport <SwitchParameter>

Use this parameter to rewrite a report file.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Class <string>

Use this parameter to run specific class tests. If you don't use this parameter, every test will be run.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UnitTests <string>

Use this parameter to run a specific test or a specific test suite. If you don't use this parameter, every

test will be run.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OutReportFileName <string>

File path to export the test results to.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ReportFormat <TestReportFormat>

Format of the test results file.



Possible values: JUnit, MsTest



Required? false

Position? named

Default value JUnit

Accept pipeline input? false

Accept wildcard characters? false



-IncludeTestData <SwitchParameter>

Use this and DataGeneratorProject parameters to add test data to the database.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DataGeneratorProject <string>

Use this parameter to specify a Data Generator project file (.dgen) that defines the data to be added to the

test database.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FilterPath <string>

Specifies the SQL Compare filter options used when generating a database to test against.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SynchronizationOptions <string>

Specifies the SQL Compare options used during creation of the script for validation.



To include additional options, specify a slash-separated list of the options.



For example: /IgnoreCase:Yes /IgnorePrimaryKeys:No



See related links for more detailed information about options.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-TemporaryDatabaseServer <object>

Connection to the temporary database used for validation.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-QueryBatchTimeout <int>

Parameter is applied for each of the following expressions if the InputObject parameter or the

TemporaryDatabaseServer parameter is an object of the DevartDatabaseConnectionInfo type:



- temporary database creation script;



- data generation script;



- testing script.



The default parameter value is 30 seconds.



Required? false

Position? named

Default value 30

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Boolean





---------- EXAMPLE 1 ----------



$testResult = Invoke-DevartDatabaseTests -InputObject $connection -InstalltSQLtFramework -IncludeTestData

-DataGeneratorProject "DababaseName(MsSqlServer).dgen" -OutReportFileName:"C:\\Test Result.xml" -ReportFormat JUnit

-RewriteReport





RELATED LINKS

See web documentation for a complete list of supported SynchronizationOptions.

http://docs.devart.com/schema-compare-f ... -line.html

Online help: https://docs.devart.com/devops-automati ... btest.html