SqlServer@1

SqlServer@1 provider lets you read data from SqlServer databases, no drivers needed.

How to upgrade?

The newer provider, SqlServer@2, is backward-compatible with this one. In some cases you might need to add ;TrustServerCertificate=true to your connection string. Otherwise we are not aware of any other things needed - just change SqlServer@1 to SqlServer@2 in your data source definitions.

Example

Data sources:
- Name: DWH
  Provider: SqlServer@1
  Connection string: data source=localhost;integrated security=SSPI;initial catalog=DWH

Storing test definitions and data source definitions in DB

Reading and testing data is not the only purpose of providers. You can also use them for retrieving (potentially also automatically generating) test defintions and / or data sources.

Any SQL statement that returns columns expected by Test definition or Data source defintition will work. But if you want to persist those, you might find useful these scripts that prepares the necessary tables:

CREATE TABLE [Test].[CAT_TestDefinition](
  [TestSuite] [NVARCHAR](300) NULL,
  [Order] [INT] NULL,
  [TestCase] [NVARCHAR](300) NULL,
  [TestName] [NVARCHAR](300) NOT NULL,
  [Description] [NVARCHAR](MAX) NULL,
  [FirstDataSource] [NVARCHAR](200) NULL,
  [FirstQuery] [NVARCHAR](MAX) NULL,
  [SecondDataSource] [NVARCHAR](200) NULL,
  [SecondQuery] [NVARCHAR](MAX) NULL,
  [Expectation] [VARCHAR](50) NOT NULL,
  [Categories] [NVARCHAR](100) NULL,
  [Tolerance] [DECIMAL](19, 4) NULL,
  [Timeout] [INT] NULL,
  [Key] [NVARCHAR](100) NULL,
  [MaximumErrorsLogged] [INT] NULL
);
CREATE TABLE [Test].[CAT_ConnectionDefinition](
  [Name] [NVARCHAR](200) NOT NULL,
  [Provider] [NVARCHAR](200) NOT NULL,
  [ConnectionString] [NVARCHAR](2000) NOT NULL
)

Just fill them up with data and let CAT know about them (see Project files).

Prerequisites

SqlServer@1 provider works out-of-the-box, you don’t need any drivers installed.