What are the challenges you face when working across database platforms? Take the survey

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

evans_pbevans_pb Posts: 3 New member
edited July 19, 2018 2:02PM in SQL Change Automation
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.

Best Answer


  • Options
    evans_pbevans_pb Posts: 3 New member
    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.
Sign In or Register to comment.