Search code examples
azureazure-blob-storagefunctional-testing

How can I make a functional test for a Blob


Does anybody knows how can I make a Fucntional test of a blob? In my Controller I have a POST method, and I need to test this function but at the internet I didn´t find anything


Solution

  • You probably don't want to test the blob service since that's an external service. If you want to test your implementation of using that service, have a look at using a Fake or Mock.

    Another solution might be to Use the Azure storage emulator for development and testing.

    The Microsoft Azure storage emulator provides a local environment that emulates the Azure Blob, Queue, and Table services for development purposes. Using the storage emulator, you can test your application against the storage services locally, without creating an Azure subscription or incurring any costs. When you're satisfied with how your application is working in the emulator, you can switch to using an Azure storage account in the cloud.