英文:
SQL Database Projects (VS Code) Unit Tests Migration
问题
我已经继承了一个SSDT项目,正在将其迁移到较新的SQL数据库项目中,使用VS Code (.NET Core)进行迁移。
目标是在Azure DevOps中创建一个基于Linux的CI/CD管道。
我很高兴地说,我已成功迁移了构建和部署数据库对象,使用Linux-based构建代理程序部署到Azure SQL实例中。
然而,我还剩下了单元测试(用.NET Framework编写),我想将它们迁移到CI管道中并整合起来。
在搜索了互联网后,我在VS Code版本的SSDT中没有找到有关单元测试的信息。似乎没有.NET Core版本的Microsoft.Data.Tools.Schema.Sql.UnitTesting
库。
在我放弃之前,是否有人已经成功迁移了单元测试到新的SQL数据库项目中?或者能否明确说明这是否可能?
英文:
I have inherited an SSDT project that I am in the process of migrating over to the newer SQL Database project in VS Code (.NET Core).
The aim is to create a Linux-based CI/CD pipeline in Azure DevOps.
I'm pleased to say I have successfully migrated the database objects which build and deploy using a Linux-based build agent to an Azure SQL instance.
However, I have been left with unit tests (written in .NET Framework) which I would like to migrate and incorporate into a CI pipeline.
Having searched the web I've found nothing on the subject of unit tests in the VS Code version of SSDT. There doesn't seem to be a .NET Core equivalent of the Microsoft.Data.Tools.Schema.Sql.UnitTesting
library.
Before I give up. Has anyone migrated unit tests over to the new SQL Database project? Or can say definitively whether this is or isn't possible?
答案1
得分: 0
答案是否定的,至少目前是这样。我最终向microsoft/azuredatastudio的人们提出了这个问题。
目前并没有立即的计划,但我们已经注意到这个问题:#12975
此外,除了.NET SQL单元测试之外,社区库tSQLt也是针对SQL项目进行单元测试的一个不错的选择。(在流水线中部署项目和单元测试到容器中,然后运行测试)
我将研究一下tSQLt,并查看是否可以迁移现有的测试。
英文:
The answer is no, well at least for now. I ended up asking the guys over at microsoft/azuredatastudio
> There isn't an immediate plan for this, but it is on our radar: #12975
>
> In addition to the .NET SQL unit tests, the community library tSQLt is a good > option for unit testing against SQL projects. (deploy project and unit tests > to container in pipeline, run tests)
I will look into tSQLt and see if I can migrate the existing tests over.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论