How can we help you today? How can we help you today?

Can you prevent the Invoke-DatabaseTests cmdlet from rebuilding the target database?

I am currently using the SQL Change Automation 3.0 and the SQL Change Automation Powershell 3.0 tools. I am using TFS VersionĀ 16.122.27102.1. We are using the Invoke-DatabaseBuild and Invoke-DatabaseTests cmdlets in order to validate the schema and run tSQLt tests, respectively. We will always run the tests after the schema has been validated. We noticed that both the Build and Test cmdlet "clean" the database and then rebuild the database from scratch. Is there a way to prevent the Invoke-DatabaseTests cmdlet from doing this? Since the Build cmdlet has already created and validated the schema, I would rather not have the build waste time by rebuilding it again the next step. I just want the Test cmdlet to run the tests and output the results. Thank you for your help.
evans_pb
0

Comments

2 comments

  • Andrea_Angella
    Unfortunately, at the moment there is not a way to do it.

    Running Invoke-DatabaseTests always does a build before running the tests.
    Andrea_Angella
    0
  • evans_pb
    Thanks for the feedback, Andrea. This would be a helpful feature to possibly add at some point.

    Now, we can just run the test step and skip the build step, since the test step validates the schema and runs tests. But it would nice to have them be separate steps within our build process.
    evans_pb
    0

Add comment

Please sign in to leave a comment.