Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (45.3k points)

I'd like to run unit / integration tests that utilise the Azure Storage Emulator rather than real storage from a Azure DevOps build.

The emulator is installed on the Hosted Build Controller as part of the Azure SDK in its usual place (C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe).

However the emulator is in the uninitialised state on the Build Controller. When trying to run the command Init from the command line, I get the following error:

This operation requires an interactive window station

Is there a known workaround for this or plans to support the emulator in Azure DevOps builds?

1 Answer

0 votes
by (16.8k points)

Just initialize SQL LocalDB first (the emulator uses it), and then start the emulator. You can do this with a command line task that runs:

sqllocaldb create MSSQLLocalDB

sqllocaldb start MSSQLLocalDB

sqllocaldb info MSSQLLocalDB

"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start

Browse Categories

...