Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Azure Serverless Computing Cookbook. - Third Edition

You're reading from  Azure Serverless Computing Cookbook. - Third Edition

Product type Book
Published in Jun 2020
Publisher Packt
ISBN-13 9781800206601
Pages 458 pages
Edition 3rd Edition
Languages
Concepts
Author (1):
Praveen Kumar Sreeram Praveen Kumar Sreeram
Profile icon Praveen Kumar Sreeram

Table of Contents (14) Chapters

Preface 1. Accelerating cloud app development using Azure Functions 2. Working with notifications using the SendGrid and Twilio services 3. Seamless integration of Azure Functions with Azure Services 4. Developing Azure Functions using Visual Studio 5. Exploring testing tools for Azure functions 6. Troubleshooting and monitoring Azure Functions 7. Developing reliable serverless applications using durable functions 8. Bulk import of data using Azure Durable Functions and Cosmos DB 9. Configuring security for Azure Functions 10. Implementing best practices for Azure Functions 11. Configuring serverless applications in the production environment 12. Implementing and deploying continuous integration using Azure DevOps Index

Developing unit tests for Azure functions with HTTP triggers

So far, we have created multiple Azure functions and validated their functionality using different tools. The functions that we have developed here have been straightforward but, in your real-world applications, it may not be that simple as there will likely be many changes to the code that was initially created. It's good practice to write automated unit tests that help test the functionality of our Azure functions. Every time you run these automated unit tests, you can test all the various paths within the code.

In this recipe, we'll learn how to use the basic HTTP trigger and see how easy it is to write automated unit test cases for this using Visual Studio Test Explorer and Moq (an open-source framework available as a NuGet package).

Getting ready

We'll be using the Moq mocking framework and xunit to develop automated unit test cases for our Azure function. Having a basic working knowledge of Moq...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}