# How to run Azure Storage unit tests in CI

If you have tests that need to exercise Blob, Queue or Table storage from Azure Storage, you can use [Azurite](https://github.com/Azure/Azurite) (v3) in CI, which can be configured for GitHub Actions as follows:

```
  - name: ⚙ azurite
    run: |
      npm install azurite
      npx azurite-table &
```

The first line will install it, and the second will start it in a background process. Tests will need to use `CloudStorageAccount.DevelopmentStorageAccount` to access the locally running instance automatically. Note that this is compatible with the older Azure Storage Emulator included with the Azure SDK with Visual Studio, so no changes are needed between local test runs and CI.

You can see this in action in the following run: <https://github.com/devlooped/TableStorage/actions/runs/829193167> which is running on all supported .NET platforms via the workflow definition at <https://github.com/devlooped/TableStorage/blob/main/.github/workflows/build.yml>.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://til.cazzulino.com/devops-ci-cd/how-to-run-azure-storage-unit-tests-in-ci.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
