Azure Block Testing and .csx Files

Azure functions abstract away many dependencies, such as queue libraries and Azure tables. Thus, of the Unit Test dependencies scoffed, there is less coding effort (and therefore less maintenance).

Assuming we are developing locally using Visual Studio 2015

  • How can I Unit Test (not interested in integration test) single Azure function? Preferably, however, in xUnit, any infrastructure will do.
  • How can I use Unit Test to use a function in a .csx file in general?
+6
source share
1 answer

In its current form, this is not realistic for the unit test of these files. For this reason (and a number of others), we switched to another model when developing functions from Visual Studio based on .cs and more standard .NET libraries. This makes a lot more โ€œnormalโ€ in Visual Studio. See doc for details.

Update: see also Failed to load the file or assembly System.Net.Http, Version = 4.1.1.0 in the unit test for Azure Functions related to unit test projects.

+11
source

Source: https://habr.com/ru/post/1015345/


All Articles