I am adding integration tests to our CI build process.
I have a database project that is deployed (via dacpac) to a localDb instance on the TFS server. (working)
The next step is to load the test data into the database. I am trying to import the SQLPS module and then run the Invoke-SqlCmd commandlet.
Import-Module 'SQLPS' -DisableNameChecking;
Invoke-Sqlcmd -InputFile "$localDirectory\products\$branch\UnitTestData.sql" -ServerInstance "(localdb)\v12.0" -Database "[db]"
I keep getting an error that SQLPS is not recognized.
The TFS server has SQL Server 2012 installed - but I am using the 2014 objects. I have installed the SQL 2014 Feature pack so that the powertools is available on the server and the build agent.
This seems pretty routine - but I'm not sure where I am going wrong here.