如何使用YAML配置文件在VSTS中的VS2017代理中启动Azure存储模拟器

问题描述 投票:2回答:1

在我的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存储模拟器的运行实例?

azure azure-devops azure-storage azure-pipelines azure-pipelines-build-task
1个回答
0
投票

试试这个:

- 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上。

© www.soinside.com 2019 - 2024. All rights reserved.