在我的 azure-pipelines.yml 文件中,我有此任务:
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
在我的集成测试中,我同时使用 MSQLLocalDB(看起来工作正常)和 AzureStorageEmulator(工作不正常)。
我想尝试this answer .
如何添加这些命令:
sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
sqllocaldb info MSSQLLocalDB
"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start
在测试任务之前运行,以便在测试开始之前拥有正在运行的 Azure 存储模拟器实例?
最佳答案
试试这个:
- script: '"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" create "v13.0" 13.0 -s'
displayName: 'Init Test Db'
- script: '"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start'
displayName: 'Start Storage Emulator'
需要位于 vs2017-win2016
vmImage 上。
关于azure - 如何使用 YAML 配置文件在 VSTS 中的 VS2017 代理中启动 Azure 存储模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52787601/